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
sourceimpl Clone for AccessDepth
impl Clone for AccessDepth
sourcefn clone(&self) -> AccessDepth
fn clone(&self) -> AccessDepth
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for AccessDepth
impl Debug for AccessDepth
sourceimpl PartialEq<AccessDepth> for AccessDepth
impl PartialEq<AccessDepth> for AccessDepth
sourcefn 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
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
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:
Shallow
: 1 byteDeep
: 0 bytesDrop
: 0 bytes