Skip to main content

SchemaResolver

Trait SchemaResolver 

Source
pub trait SchemaResolver {
    // Required method
    fn resolve(
        &self,
        href: &str,
        base_uri: &str,
    ) -> Result<SchemaSource, ResolveError>;
}
Expand description

Resolves an <include href="..."> href (relative to a base URI) to the SchemaSource it names. This crate has no file-system or network access of its own — implement this over whatever loading mechanism fits the caller.

Required Methods§

Source

fn resolve( &self, href: &str, base_uri: &str, ) -> Result<SchemaSource, ResolveError>

Resolves href (as it literally appears in the schema) relative to base_uri, or fails with a ResolveError if it can’t be found, read, or is disallowed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§