pub fn validate_api(
api: &mut Api,
source: Option<(&str, &str)>,
) -> Result<(), ValidationDiagnostic>Expand description
Validate an Api. The optional source is (filename, contents) of the
IDL file and is used at the call site to attach a span to a returned error
via ValidationDiagnostic::new. Pass None when the API is constructed
in memory (tests, programmatic builds) and there is no on-disk source.