pub struct FileResolver { /* private fields */ }
Available on crate feature
loader
only.Expand description
The file module resolver
This resolver can be used as the nested backing resolver in user-defined resolvers.
Implementations§
Source§impl FileResolver
impl FileResolver
Sourcepub fn add_path<P: Into<RelativePathBuf>>(&mut self, path: P) -> &mut Self
pub fn add_path<P: Into<RelativePathBuf>>(&mut self, path: P) -> &mut Self
Add search path for modules
Sourcepub fn with_path<P: Into<RelativePathBuf>>(self, path: P) -> Self
pub fn with_path<P: Into<RelativePathBuf>>(self, path: P) -> Self
Add search path for modules
Sourcepub fn add_paths<I: IntoIterator<Item = P>, P: Into<RelativePathBuf>>(
&mut self,
paths: I,
) -> &mut Self
pub fn add_paths<I: IntoIterator<Item = P>, P: Into<RelativePathBuf>>( &mut self, paths: I, ) -> &mut Self
Add search paths for modules
Sourcepub fn with_paths<I: IntoIterator<Item = P>, P: Into<RelativePathBuf>>(
self,
paths: I,
) -> Self
pub fn with_paths<I: IntoIterator<Item = P>, P: Into<RelativePathBuf>>( self, paths: I, ) -> Self
Add search paths for modules
Sourcepub fn add_pattern<P: Into<String>>(&mut self, pattern: P) -> &mut Self
pub fn add_pattern<P: Into<String>>(&mut self, pattern: P) -> &mut Self
Add module file pattern
Sourcepub fn with_pattern<P: Into<String>>(self, pattern: P) -> Self
pub fn with_pattern<P: Into<String>>(self, pattern: P) -> Self
Add module file pattern
Sourcepub fn add_native(&mut self) -> &mut Self
pub fn add_native(&mut self) -> &mut Self
Add support for native modules
Sourcepub fn with_native(self) -> Self
pub fn with_native(self) -> Self
Add support for native modules
Trait Implementations§
Source§impl Debug for FileResolver
impl Debug for FileResolver
Source§impl Default for FileResolver
impl Default for FileResolver
Auto Trait Implementations§
impl Freeze for FileResolver
impl RefUnwindSafe for FileResolver
impl Send for FileResolver
impl Sync for FileResolver
impl Unpin for FileResolver
impl UnwindSafe for FileResolver
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more