UrlResolver

Trait UrlResolver 

Source
pub trait UrlResolver<'a, T> {
    type Error;

    // Required method
    fn resolve(&self, url: &UrlRef<T>) -> Result<&'a T, Self::Error>;
}
Expand description

This trait abstracts over types that can be used to resolve URL references. It is implemented for LocalMap and LocalMaps, and user types can also implement this trait to provide external URL resolution.

Required Associated Types§

Source

type Error

The error type of the resolver.

Required Methods§

Source

fn resolve(&self, url: &UrlRef<T>) -> Result<&'a T, Self::Error>

Resolve an individual URL.

Implementors§

Source§

impl<'a, T> UrlResolver<'a, T> for LocalMap<'a, T>

Source§

impl<'a, T: HasId> UrlResolver<'a, T> for LocalMaps<'a>