pub struct ModuleCatalog { /* private fields */ }
Expand description
This type represents the content of a resolver file.
Implementations§
Source§impl ModuleCatalog
impl ModuleCatalog
Sourcepub fn load_from_current(look_in_parents: bool) -> Option<Self>
pub fn load_from_current(look_in_parents: bool) -> Option<Self>
Load a resolver catalog file from the current directory.
If the parameter look_in_parents
is true
this will check parent directories.
Sourcepub fn load_from(path: &Path, look_in_parents: bool) -> Option<Self>
pub fn load_from(path: &Path, look_in_parents: bool) -> Option<Self>
Load a resolver catalog file from the path
.
If the parameter look_in_parents
is true
this will check parent directories.
pub fn base(&self) -> &Url
pub fn set_base(&mut self, base: Url)
pub fn loaded_from(&self) -> &PathBuf
pub fn has_entries(&self) -> bool
pub fn get_entry(&self, key: &String) -> Option<&CatalogEntry>
pub fn entries_contains_key(&self, key: &String) -> bool
pub fn entries(&self) -> impl Iterator<Item = (&String, &CatalogEntry)>
pub fn entry_keys(&self) -> impl Iterator<Item = &String>
pub fn entry_values(&self) -> impl Iterator<Item = &CatalogEntry>
pub fn groups(&self) -> impl Iterator<Item = (&String, &Group)>
pub fn items(&self) -> impl Iterator<Item = (&String, &Item)>
pub fn resolve_uri(&self, module: &String) -> Option<Url>
pub fn resolve_local_path(&self, module: &String) -> Option<PathBuf>
Trait Implementations§
Source§impl Clone for ModuleCatalog
impl Clone for ModuleCatalog
Source§fn clone(&self) -> ModuleCatalog
fn clone(&self) -> ModuleCatalog
Returns a duplicate 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 ModuleCatalog
impl Debug for ModuleCatalog
Source§impl<'de> Deserialize<'de> for ModuleCatalog
impl<'de> Deserialize<'de> for ModuleCatalog
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModuleCatalog
impl RefUnwindSafe for ModuleCatalog
impl Send for ModuleCatalog
impl Sync for ModuleCatalog
impl Unpin for ModuleCatalog
impl UnwindSafe for ModuleCatalog
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