Resolver

Trait Resolver 

Source
pub trait Resolver: Debug {
    type Buffer;
    type Error: Display;

    // Required method
    fn resolve(&mut self, req: &ResolveRequest) -> ResolveResult<Self>;
}
Expand description

Trait that defines a so called resolver that can be used to load schema information from different sources.

Required Associated Types§

Source

type Buffer

Buffer that contains the data of the resolved schema.

Source

type Error: Display

Error that is returned by the resolver.

Required Methods§

Source

fn resolve(&mut self, req: &ResolveRequest) -> ResolveResult<Self>

Try to resolve the schema information from the passed request.

This methods tries to resolve the schema information by using the information provided by the passed request. If the operation was successful the name, url and a buffer that contains the schema information is returned in Ok(Some((name, url, buffer))). If the request could not be resolved Ok(None) is returned.

§Errors

May return any error if resolving the schema information was not successful.

Implementors§