Enum rustc_middle::middle::privacy::AccessLevel
source · pub enum AccessLevel {
ReachableFromImplTrait,
Reachable,
Exported,
Public,
}
Expand description
Represents the levels of accessibility an item can have.
The variants are sorted in ascending order of accessibility.
Variants
ReachableFromImplTrait
Superset of AccessLevel::Reachable
used to mark impl Trait items.
Reachable
Exported items + items participating in various kinds of public interfaces,
but not directly nameable. For example, if function fn f() -> T {...}
is
public, then type T
is reachable. Its values can be obtained by other crates
even if the type itself is not nameable.
Exported
Public items + items accessible to other crates with the help of pub use
re-exports.
Public
Items accessible to other crates directly, without the help of re-exports.
Trait Implementations
sourceimpl Clone for AccessLevel
impl Clone for AccessLevel
sourcefn clone(&self) -> AccessLevel
fn clone(&self) -> AccessLevel
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for AccessLevel
impl Debug for AccessLevel
sourceimpl<'__ctx> HashStable<StableHashingContext<'__ctx>> for AccessLevel
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for AccessLevel
fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
sourceimpl Ord for AccessLevel
impl Ord for AccessLevel
sourcefn cmp(&self, other: &AccessLevel) -> Ordering
fn cmp(&self, other: &AccessLevel) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialEq<AccessLevel> for AccessLevel
impl PartialEq<AccessLevel> for AccessLevel
sourcefn eq(&self, other: &AccessLevel) -> bool
fn eq(&self, other: &AccessLevel) -> bool
sourceimpl PartialOrd<AccessLevel> for AccessLevel
impl PartialOrd<AccessLevel> for AccessLevel
sourcefn partial_cmp(&self, other: &AccessLevel) -> Option<Ordering>
fn partial_cmp(&self, other: &AccessLevel) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AccessLevel
impl Eq for AccessLevel
impl StructuralEq for AccessLevel
impl StructuralPartialEq for AccessLevel
Auto Trait Implementations
impl RefUnwindSafe for AccessLevel
impl Send for AccessLevel
impl Sync for AccessLevel
impl Unpin for AccessLevel
impl UnwindSafe for AccessLevel
Blanket Implementations
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
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
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
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>
DepNode
,
something which is needed when forcing DepNode
s 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) -> 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: 1 byte
Size for each variant:
ReachableFromImplTrait
: 0 bytesReachable
: 0 bytesExported
: 0 bytesPublic
: 0 bytes