pub struct DefaultModuleResolver { /* private fields */ }Expand description
The default resolver, combining standard library, local filesystem, and (optionally) HTTP sources.
Implementations§
Trait Implementations§
Source§impl Clone for DefaultModuleResolver
impl Clone for DefaultModuleResolver
Source§fn clone(&self) -> DefaultModuleResolver
fn clone(&self) -> DefaultModuleResolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DefaultModuleResolver
impl Debug for DefaultModuleResolver
Source§impl Default for DefaultModuleResolver
impl Default for DefaultModuleResolver
Source§fn default() -> DefaultModuleResolver
fn default() -> DefaultModuleResolver
Returns the “default value” for a type. Read more
Source§impl ModuleResolver for DefaultModuleResolver
impl ModuleResolver for DefaultModuleResolver
Source§fn resolve(&self, module_name: &str) -> Result<String, ModuleError>
fn resolve(&self, module_name: &str) -> Result<String, ModuleError>
Returns the source content of
module_name.Source§fn get_path(&self, module_name: &str) -> Result<String, ModuleError>
fn get_path(&self, module_name: &str) -> Result<String, ModuleError>
Returns the canonical path string for
module_name (for diagnostics / LSP).Source§fn search_paths(&self) -> Vec<PathBuf>
fn search_paths(&self) -> Vec<PathBuf>
Returns the filesystem directories this resolver searches.
Source§fn set_search_paths(&mut self, paths: Vec<PathBuf>)
fn set_search_paths(&mut self, paths: Vec<PathBuf>)
Replaces the filesystem search directories.
Auto Trait Implementations§
impl Freeze for DefaultModuleResolver
impl RefUnwindSafe for DefaultModuleResolver
impl Send for DefaultModuleResolver
impl Sync for DefaultModuleResolver
impl Unpin for DefaultModuleResolver
impl UnsafeUnpin for DefaultModuleResolver
impl UnwindSafe for DefaultModuleResolver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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