Struct sdml_parse::load::FsModuleResolver
source · pub struct FsModuleResolver { /* private fields */ }
Expand description
The resolver implements the logic to map module identifiers to file system paths using the
environment variable SDML_PATH
to contain a search path.
Implementations§
source§impl FsModuleResolver
impl FsModuleResolver
sourcepub fn prepend_to_search_path(&mut self, path: &Path)
pub fn prepend_to_search_path(&mut self, path: &Path)
Add the provided path to the beginning of the search list.
sourcepub fn append_to_search_path(&mut self, path: &Path)
pub fn append_to_search_path(&mut self, path: &Path)
Add the provided path to the end of the search list.
sourcepub fn name_to_path(
&self,
name: &Identifier,
from: Option<FileId>,
) -> Result<PathBuf, Error>
pub fn name_to_path( &self, name: &Identifier, from: Option<FileId>, ) -> Result<PathBuf, Error>
Return a file system path for the resource that /should/ contain the named module.
Trait Implementations§
source§impl Clone for FsModuleResolver
impl Clone for FsModuleResolver
source§fn clone(&self) -> FsModuleResolver
fn clone(&self) -> FsModuleResolver
Returns a copy of the value. Read more
1.0.0 · 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 FsModuleResolver
impl Debug for FsModuleResolver
source§impl Default for FsModuleResolver
impl Default for FsModuleResolver
source§impl ModuleResolver for FsModuleResolver
impl ModuleResolver for FsModuleResolver
source§fn name_to_resource(
&self,
name: &Identifier,
from: Option<FileId>,
) -> Result<Url, Error>
fn name_to_resource( &self, name: &Identifier, from: Option<FileId>, ) -> Result<Url, Error>
Return a URL given the module name
name
.Auto Trait Implementations§
impl Freeze for FsModuleResolver
impl RefUnwindSafe for FsModuleResolver
impl Send for FsModuleResolver
impl Sync for FsModuleResolver
impl Unpin for FsModuleResolver
impl UnwindSafe for FsModuleResolver
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)