Struct rustc::hir::def::PerNS [−][src]
pub struct PerNS<T> { pub value_ns: T, pub type_ns: T, pub macro_ns: T, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Just a helper ‒ separate structure for each namespace.
Fields
value_ns: T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
type_ns: T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
macro_ns: T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<T> PerNS<T>
[src]
impl<T> PerNS<T>
pub fn map<U, F: FnMut(T) -> U>(self, f: F) -> PerNS<U>
[src]
pub fn map<U, F: FnMut(T) -> U>(self, f: F) -> PerNS<U>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<T> PerNS<Option<T>>
[src]
impl<T> PerNS<Option<T>>
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns whether all the items in this collection are None
.
pub fn present_items(self) ->
[src]
pub fn present_items(self) ->
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns an iterator over the items which are Some
.
Trait Implementations
impl<T: Copy> Copy for PerNS<T>
[src]
impl<T: Copy> Copy for PerNS<T>
impl<T: Clone> Clone for PerNS<T>
[src]
impl<T: Clone> Clone for PerNS<T>
fn clone(&self) -> PerNS<T>
[src]
fn clone(&self) -> PerNS<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Default> Default for PerNS<T>
[src]
impl<T: Default> Default for PerNS<T>
impl<T: Debug> Debug for PerNS<T>
[src]
impl<T: Debug> Debug for PerNS<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Index<Namespace> for PerNS<T>
[src]
impl<T> Index<Namespace> for PerNS<T>
type Output = T
The returned type after indexing.
ⓘImportant traits for &'a mut Wfn index(&self, ns: Namespace) -> &T
[src]
fn index(&self, ns: Namespace) -> &T
Performs the indexing (container[index]
) operation.
impl<T> IndexMut<Namespace> for PerNS<T>
[src]
impl<T> IndexMut<Namespace> for PerNS<T>