Struct rustc_resolve::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>(self, f: F) -> PerNS<U> where
F: FnMut(T) -> U, [src]
pub fn map<U, F>(self, f: F) -> PerNS<U> where
F: FnMut(T) -> 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
) -> impl Iterator<Item = T>[src]
pub fn present_items(
self
) -> impl Iterator<Item = 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?
Returns an iterator over the items which are Some.
Trait Implementations
impl<T> Default for PerNS<T> where
T: Default, [src]
impl<T> Default for PerNS<T> where
T: Default, 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) -> &TPerforms the indexing (container[index]) operation.
impl<T> Clone for PerNS<T> where
T: Clone, [src]
impl<T> Clone for PerNS<T> where
T: Clone, 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> Copy for PerNS<T> where
T: Copy, [src]
impl<T> Copy for PerNS<T> where
T: Copy, impl<T> IndexMut<Namespace> for PerNS<T>[src]
impl<T> IndexMut<Namespace> for PerNS<T>ⓘImportant traits for &'a mut Wfn index_mut(&mut self, ns: Namespace) -> &mut T[src]
fn index_mut(&mut self, ns: Namespace) -> &mut TPerforms the mutable indexing (container[index]) operation.
impl<T> Debug for PerNS<T> where
T: Debug, [src]
impl<T> Debug for PerNS<T> where
T: Debug,