Struct rustc_middle::middle::privacy::EffectiveVisibilities
source · pub struct EffectiveVisibilities {
map: FxHashMap<LocalDefId, EffectiveVisibility>,
}Expand description
Holds a map of effective visibilities for reachable HIR nodes.
Fields
map: FxHashMap<LocalDefId, EffectiveVisibility>Implementations
sourceimpl EffectiveVisibilities
impl EffectiveVisibilities
pub fn is_public_at_level(&self, id: LocalDefId, level: Level) -> bool
sourcepub fn is_reachable(&self, id: LocalDefId) -> bool
pub fn is_reachable(&self, id: LocalDefId) -> bool
See Level::Reachable.
sourcepub fn is_exported(&self, id: LocalDefId) -> bool
pub fn is_exported(&self, id: LocalDefId) -> bool
See Level::Reexported.
sourcepub fn is_directly_public(&self, id: LocalDefId) -> bool
pub fn is_directly_public(&self, id: LocalDefId) -> bool
See Level::Direct.
pub fn public_at_level(&self, id: LocalDefId) -> Option<Level>
pub fn effective_vis(&self, id: LocalDefId) -> Option<&EffectiveVisibility>
pub fn iter(&self) -> impl Iterator<Item = (&LocalDefId, &EffectiveVisibility)>
pub fn set_public_at_level(
&mut self,
id: LocalDefId,
default_vis: impl FnOnce() -> Visibility,
level: Level
)
pub fn update(
&mut self,
id: LocalDefId,
nominal_vis: Visibility,
default_vis: impl FnOnce() -> Visibility,
parent_id: LocalDefId,
level: Level,
tree: impl DefIdTree
) -> bool
Trait Implementations
sourceimpl<'tcx> ArenaAllocatable<'tcx, IsNotCopy> for EffectiveVisibilities
impl<'tcx> ArenaAllocatable<'tcx, IsNotCopy> for EffectiveVisibilities
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = Self>
) -> &'a mut [Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourceimpl Clone for EffectiveVisibilities
impl Clone for EffectiveVisibilities
sourcefn clone(&self) -> EffectiveVisibilities
fn clone(&self) -> EffectiveVisibilities
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for EffectiveVisibilities
impl Debug for EffectiveVisibilities
sourceimpl Default for EffectiveVisibilities
impl Default for EffectiveVisibilities
sourcefn default() -> EffectiveVisibilities
fn default() -> EffectiveVisibilities
Returns the “default value” for a type. Read more
sourceimpl<'a> HashStable<StableHashingContext<'a>> for EffectiveVisibilities
impl<'a> HashStable<StableHashingContext<'a>> for EffectiveVisibilities
fn hash_stable(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher
)
Auto Trait Implementations
impl RefUnwindSafe for EffectiveVisibilities
impl Send for EffectiveVisibilities
impl Sync for EffectiveVisibilities
impl Unpin for EffectiveVisibilities
impl UnwindSafe for EffectiveVisibilities
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Ctxt, T> DepNodeParams<Ctxt> for Twhere
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
impl<Ctxt, T> DepNodeParams<Ctxt> for Twhere
Ctxt: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
default fn fingerprint_style() -> FingerprintStyle
sourcedefault fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint
default fn to_fingerprint(&self, tcx: Ctxt) -> Fingerprint
This method turns the parameters of a DepNodeConstructor into an opaque
Fingerprint to be used in DepNode.
Not all DepNodeParams support being turned into a Fingerprint (they
don’t need to if the corresponding DepNode is anonymous). Read more
default fn to_debug_str(&self, Ctxt) -> String
sourcedefault fn recover(Ctxt, &DepNode<<Ctxt as DepContext>::DepKind>) -> Option<T>
default fn recover(Ctxt, &DepNode<<Ctxt as DepContext>::DepKind>) -> Option<T>
This method tries to recover the query key from the given
DepNode,
something which is needed when forcing DepNodes during red-green
evaluation. The query system will only call this method if
fingerprint_style() is not FingerprintStyle::Opaque.
It is always valid to return None here, in which case incremental
compilation will treat the query as having changed instead of forcing it. Read moresourceimpl<T, R> InternIteratorElement<T, R> for T
impl<T, R> InternIteratorElement<T, R> for T
type Output = R
fn intern_with<I, F>(iter: I, f: F) -> <T as InternIteratorElement<T, R>>::Outputwhere
I: Iterator<Item = T>,
F: FnOnce(&[T]) -> R,
sourceimpl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
sourceimpl<CTX, T> Value<CTX> for Twhere
CTX: DepContext,
impl<CTX, T> Value<CTX> for Twhere
CTX: DepContext,
default fn from_cycle_error(tcx: CTX, &[QueryInfo]) -> T
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes