pub struct Namespace { /* private fields */ }Expand description
Namespace metadata without platform syscalls.
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub const fn new(kind: NamespaceKind) -> Namespace
pub const fn new(kind: NamespaceKind) -> Namespace
Creates namespace metadata from a kind.
Sourcepub fn with_path(self, path: NamespacePath) -> Namespace
pub fn with_path(self, path: NamespacePath) -> Namespace
Adds a lexical namespace path.
Sourcepub const fn kind(&self) -> NamespaceKind
pub const fn kind(&self) -> NamespaceKind
Returns the namespace kind.
Sourcepub const fn path(&self) -> Option<&NamespacePath>
pub const fn path(&self) -> Option<&NamespacePath>
Returns the optional namespace path.
Trait Implementations§
Source§impl Ord for Namespace
impl Ord for Namespace
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Namespace
impl PartialOrd for Namespace
impl Eq for Namespace
impl StructuralPartialEq for Namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl Send for Namespace
impl Sync for Namespace
impl Unpin for Namespace
impl UnsafeUnpin for Namespace
impl UnwindSafe for Namespace
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