pub struct MapResolver { /* private fields */ }Expand description
Resolve references against a map of path to content.
Keys are used exactly as given, so a map is a closed world: nothing outside it can be reached, whatever a document asks for. This is the resolver the shared fixtures run against.
Implementations§
Trait Implementations§
Source§impl Clone for MapResolver
impl Clone for MapResolver
Source§impl Debug for MapResolver
impl Debug for MapResolver
Source§impl Default for MapResolver
impl Default for MapResolver
Source§impl<K, V> FromIterator<(K, V)> for MapResolver
impl<K, V> FromIterator<(K, V)> for MapResolver
Source§impl Resolver for MapResolver
impl Resolver for MapResolver
Source§fn resolve(
&self,
reference: Option<&str>,
input: &ResolverInput<'_>,
) -> Resolution
fn resolve( &self, reference: Option<&str>, input: &ResolverInput<'_>, ) -> Resolution
Resolve
reference to a Resolution. A reference that names
nothing returns Resolution::not_found; raising the error is
the plugin’s job, not the resolver’s.Auto Trait Implementations§
impl Freeze for MapResolver
impl RefUnwindSafe for MapResolver
impl Send for MapResolver
impl Sync for MapResolver
impl Unpin for MapResolver
impl UnsafeUnpin for MapResolver
impl UnwindSafe for MapResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more