Struct rquickjs_core::FileResolver
source · [−]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
sourceimpl 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
sourceimpl Debug for FileResolver
impl Debug for FileResolver
sourceimpl Default for FileResolver
impl Default for FileResolver
Auto Trait Implementations
impl RefUnwindSafe for FileResolver
impl Send for FileResolver
impl Sync for FileResolver
impl Unpin for FileResolver
impl UnwindSafe for FileResolver
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more