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>(&mut self, path: P) -> &mut FileResolverwhere
P: Into<RelativePathBuf>,
pub fn add_path<P>(&mut self, path: P) -> &mut FileResolverwhere
P: Into<RelativePathBuf>,
Add search path for modules
Sourcepub fn with_path<P>(self, path: P) -> FileResolverwhere
P: Into<RelativePathBuf>,
pub fn with_path<P>(self, path: P) -> FileResolverwhere
P: Into<RelativePathBuf>,
Add search path for modules
Sourcepub fn add_paths<I, P>(&mut self, paths: I) -> &mut FileResolver
pub fn add_paths<I, P>(&mut self, paths: I) -> &mut FileResolver
Add search paths for modules
Sourcepub fn with_paths<I, P>(self, paths: I) -> FileResolver
pub fn with_paths<I, P>(self, paths: I) -> FileResolver
Add search paths for modules
Sourcepub fn add_pattern<P>(&mut self, pattern: P) -> &mut FileResolver
pub fn add_pattern<P>(&mut self, pattern: P) -> &mut FileResolver
Add module file pattern
Sourcepub fn with_pattern<P>(self, pattern: P) -> FileResolver
pub fn with_pattern<P>(self, pattern: P) -> FileResolver
Add module file pattern
Sourcepub fn add_native(&mut self) -> &mut FileResolver
pub fn add_native(&mut self) -> &mut FileResolver
Add support for native modules
Sourcepub fn with_native(self) -> FileResolver
pub fn with_native(self) -> FileResolver
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
Source§fn default() -> FileResolver
fn default() -> FileResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FileResolver
impl RefUnwindSafe for FileResolver
impl Send for FileResolver
impl Sync for FileResolver
impl Unpin for FileResolver
impl UnsafeUnpin 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