Struct sdml_parse::load::ModuleResolver
source · pub struct ModuleResolver { /* 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 ModuleResolver
impl ModuleResolver
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) -> Result<PathBuf, Error>
pub fn name_to_path(&self, name: &Identifier) -> Result<PathBuf, Error>
Return a file system path for the resource that /should/ contain the named module.
Trait Implementations§
source§impl Clone for ModuleResolver
impl Clone for ModuleResolver
source§fn clone(&self) -> ModuleResolver
fn clone(&self) -> ModuleResolver
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 ModuleResolver
impl Debug for ModuleResolver
Auto Trait Implementations§
impl RefUnwindSafe for ModuleResolver
impl Send for ModuleResolver
impl Sync for ModuleResolver
impl Unpin for ModuleResolver
impl UnwindSafe for ModuleResolver
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