pub struct NamespaceRegistry { /* private fields */ }Implementations§
Source§impl NamespaceRegistry
impl NamespaceRegistry
pub fn new_empty(root: PathBuf) -> Result<Self, RegistryError>
pub fn from_file(path: impl AsRef<Path>) -> Result<Self, RegistryError>
pub fn discover(start: impl AsRef<Path>) -> Result<Option<Self>, RegistryError>
pub fn root(&self) -> &Path
pub fn default_namespace(&self) -> &str
pub fn namespace_for(&self, path: impl AsRef<Path>) -> Option<&str>
pub fn namespace_for_with_options( &self, path: impl AsRef<Path>, fail_on_ambiguity: bool, ) -> Result<&str, RegistryError>
pub fn resolve_files(&self) -> Result<Vec<NamespaceBinding>, RegistryError>
pub fn resolve_files_with_options( &self, fail_on_ambiguity: bool, ) -> Result<Vec<NamespaceBinding>, RegistryError>
Trait Implementations§
Source§impl Clone for NamespaceRegistry
impl Clone for NamespaceRegistry
Source§fn clone(&self) -> NamespaceRegistry
fn clone(&self) -> NamespaceRegistry
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 moreAuto Trait Implementations§
impl Freeze for NamespaceRegistry
impl RefUnwindSafe for NamespaceRegistry
impl Send for NamespaceRegistry
impl Sync for NamespaceRegistry
impl Unpin for NamespaceRegistry
impl UnwindSafe for NamespaceRegistry
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