Enum rustc_borrowck::AccessDepth
source · pub(crate) enum AccessDepth {
Shallow(Option<ArtificialField>),
Deep,
Drop,
}
Variants§
Shallow(Option<ArtificialField>)
From the RFC: “A shallow access means that the immediate
fields reached at P are accessed, but references or pointers
found within are not dereferenced. Right now, the only access
that is shallow is an assignment like x = ...;
, which would
be a shallow write of x
.”
Deep
From the RFC: “A deep access means that all data reachable through the given place may be invalidated or accesses by this action.”
Drop
Access is Deep only when there is a Drop implementation that can reach the data behind the reference.
Trait Implementations§
source§impl Clone for AccessDepth
impl Clone for AccessDepth
source§fn clone(&self) -> AccessDepth
fn clone(&self) -> AccessDepth
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AccessDepth
impl Debug for AccessDepth
source§impl PartialEq<AccessDepth> for AccessDepth
impl PartialEq<AccessDepth> for AccessDepth
source§fn eq(&self, other: &AccessDepth) -> bool
fn eq(&self, other: &AccessDepth) -> bool
impl Copy for AccessDepth
impl Eq for AccessDepth
impl StructuralEq for AccessDepth
impl StructuralPartialEq for AccessDepth
Auto Trait Implementations§
impl RefUnwindSafe for AccessDepth
impl Send for AccessDepth
impl Sync for AccessDepth
impl Unpin for AccessDepth
impl UnwindSafe for AccessDepth
Blanket Implementations§
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:
Shallow
: 1 byteDeep
: 0 bytesDrop
: 0 bytes