pub struct PerNs {
pub types: Option<(ModuleDefId, Visibility, Option<ImportOrExternCrate>)>,
pub values: Option<(ModuleDefId, Visibility, Option<ImportId>)>,
pub macros: Option<(MacroId, Visibility, Option<ImportId>)>,
}
Fields§
§types: Option<(ModuleDefId, Visibility, Option<ImportOrExternCrate>)>
§values: Option<(ModuleDefId, Visibility, Option<ImportId>)>
§macros: Option<(MacroId, Visibility, Option<ImportId>)>
Implementations§
source§impl PerNs
impl PerNs
pub fn none() -> PerNs
pub fn values(t: ModuleDefId, v: Visibility, i: Option<ImportId>) -> PerNs
pub fn types( t: ModuleDefId, v: Visibility, i: Option<ImportOrExternCrate>, ) -> PerNs
pub fn both( types: ModuleDefId, values: ModuleDefId, v: Visibility, i: Option<ImportOrExternCrate>, ) -> PerNs
pub fn macros(macro_: MacroId, v: Visibility, i: Option<ImportId>) -> PerNs
pub fn is_none(&self) -> bool
pub fn is_full(&self) -> bool
pub fn take_types(self) -> Option<ModuleDefId>
pub fn take_types_full( self, ) -> Option<(ModuleDefId, Visibility, Option<ImportOrExternCrate>)>
pub fn take_values(self) -> Option<ModuleDefId>
pub fn take_values_import(self) -> Option<(ModuleDefId, Option<ImportId>)>
pub fn take_macros(self) -> Option<MacroId>
pub fn take_macros_import(self) -> Option<(MacroId, Option<ImportId>)>
pub fn filter_visibility(self, f: impl FnMut(Visibility) -> bool) -> PerNs
pub fn with_visibility(self, vis: Visibility) -> PerNs
pub fn or(self, other: PerNs) -> PerNs
pub fn or_else(self, f: impl FnOnce() -> PerNs) -> PerNs
pub fn iter_items( self, ) -> impl Iterator<Item = (ItemInNs, Option<ImportOrExternCrate>)>
Trait Implementations§
impl Copy for PerNs
impl Eq for PerNs
impl StructuralPartialEq for PerNs
Auto Trait Implementations§
impl Freeze for PerNs
impl RefUnwindSafe for PerNs
impl Send for PerNs
impl Sync for PerNs
impl Unpin for PerNs
impl UnwindSafe for PerNs
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
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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