pub enum Namespace {
Named(NamedNamespace),
Any(AnyNamespace),
}
Variants§
Named(NamedNamespace)
Any(AnyNamespace)
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub fn as_named(&self) -> Option<&NamedNamespace>
pub fn as_named(&self) -> Option<&NamedNamespace>
Returns Some
if self
is a reference of variant Named
, and None
otherwise.
Sourcepub fn as_mut_named(&mut self) -> Option<&mut NamedNamespace>
pub fn as_mut_named(&mut self) -> Option<&mut NamedNamespace>
Returns Some
if self
is a mutable reference of variant Named
, and None
otherwise.
Sourcepub fn expect_named(self) -> NamedNamespacewhere
Self: Debug,
pub fn expect_named(self) -> NamedNamespacewhere
Self: Debug,
Sourcepub fn named(self) -> Option<NamedNamespace>
pub fn named(self) -> Option<NamedNamespace>
Returns Some
if self
is of variant Named
, and None
otherwise.
Sourcepub fn as_any(&self) -> Option<&AnyNamespace>
pub fn as_any(&self) -> Option<&AnyNamespace>
Returns Some
if self
is a reference of variant Any
, and None
otherwise.
Sourcepub fn as_mut_any(&mut self) -> Option<&mut AnyNamespace>
pub fn as_mut_any(&mut self) -> Option<&mut AnyNamespace>
Returns Some
if self
is a mutable reference of variant Any
, and None
otherwise.
Sourcepub fn expect_any(self) -> AnyNamespacewhere
Self: Debug,
pub fn expect_any(self) -> AnyNamespacewhere
Self: Debug,
Sourcepub fn any(self) -> Option<AnyNamespace>
pub fn any(self) -> Option<AnyNamespace>
Returns Some
if self
is of variant Any
, and None
otherwise.
Trait Implementations§
Source§impl EqIgnoreSpan for Namespace
impl EqIgnoreSpan for Namespace
fn eq_ignore_span(&self, other: &Self) -> bool
Source§impl From<AnyNamespace> for Namespace
impl From<AnyNamespace> for Namespace
Source§fn from(v: AnyNamespace) -> Self
fn from(v: AnyNamespace) -> Self
Converts to this type from the input type.
Source§impl From<NamedNamespace> for Namespace
impl From<NamedNamespace> for Namespace
Source§fn from(v: NamedNamespace) -> Self
fn from(v: NamedNamespace) -> Self
Converts to this type from the input type.
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more