pub struct NamespacePath { /* private fields */ }Expand description
A path qualified by namespace.
Both parts are validated at construction — NamespacePath::parse for
strings, NamespacePath::new for already-typed parts — so a value of
this type always names a well-formed target.
Implementations§
Source§impl NamespacePath
impl NamespacePath
Sourcepub fn parse(namespace: &str, absolute_path: &str) -> Result<Self>
pub fn parse(namespace: &str, absolute_path: &str) -> Result<Self>
Parses and validates both parts of a namespace-qualified path.
Sourcepub fn new(namespace: NamespaceId, absolute_path: AbsolutePath) -> Self
pub fn new(namespace: NamespaceId, absolute_path: AbsolutePath) -> Self
Pairs already-validated parts without re-parsing.
Sourcepub fn namespace(&self) -> &NamespaceId
pub fn namespace(&self) -> &NamespaceId
Namespace the path is scoped to.
Sourcepub fn absolute_path(&self) -> &AbsolutePath
pub fn absolute_path(&self) -> &AbsolutePath
Absolute path inside the namespace.
Trait Implementations§
Source§impl Clone for NamespacePath
impl Clone for NamespacePath
Source§fn clone(&self) -> NamespacePath
fn clone(&self) -> NamespacePath
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 NamespacePath
impl Debug for NamespacePath
impl Eq for NamespacePath
Source§impl PartialEq for NamespacePath
impl PartialEq for NamespacePath
impl StructuralPartialEq for NamespacePath
Auto Trait Implementations§
impl Freeze for NamespacePath
impl RefUnwindSafe for NamespacePath
impl Send for NamespacePath
impl Sync for NamespacePath
impl Unpin for NamespacePath
impl UnsafeUnpin for NamespacePath
impl UnwindSafe for NamespacePath
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.