pub struct ResolverInput<'a> {
pub options: &'a MultiSourceOptions,
pub meta: &'a Value,
}Expand description
What a Resolver is given: the plugin options and the parse
metadata for the enclosing source.
The canonical TypeScript hands a resolver the whole parse Context,
of which resolvers read only ctx.meta. Narrowing it to the metadata
keeps a resolver callable, and therefore testable, outside a parse.
Fields§
§options: &'a MultiSourceOptionsThe plugin options in force for this parse.
meta: &'a ValueThe parse metadata. multisource.path names the source that
contains this reference, when there is one.
Implementations§
Source§impl ResolverInput<'_>
impl ResolverInput<'_>
Sourcepub fn source_path(&self) -> Option<String>
pub fn source_path(&self) -> Option<String>
The full path of the source that contains this reference, when the reference was found inside another source.
Trait Implementations§
Source§impl<'a> Clone for ResolverInput<'a>
impl<'a> Clone for ResolverInput<'a>
impl<'a> Copy for ResolverInput<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ResolverInput<'a>
impl<'a> !UnwindSafe for ResolverInput<'a>
impl<'a> Freeze for ResolverInput<'a>
impl<'a> Send for ResolverInput<'a>
impl<'a> Sync for ResolverInput<'a>
impl<'a> Unpin for ResolverInput<'a>
impl<'a> UnsafeUnpin for ResolverInput<'a>
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