Enum miri::borrow_tracker::tree_borrows::perms::PermissionPriv
source · enum PermissionPriv {
Reserved {
ty_is_freeze: bool,
},
Active,
Frozen,
Disabled,
}
Expand description
The activation states of a pointer.
Variants§
Reserved
represents: a local reference that has not yet been written to; allows: child reads, foreign reads, foreign writes if type is freeze; rejects: child writes (Active), foreign writes (Disabled, except if type is not freeze). special case: behaves differently when protected to adhere more closely to noalias
Active
represents: a unique pointer; allows: child reads, child writes; rejects: foreign reads (Frozen), foreign writes (Disabled).
Frozen
represents: a shared pointer; allows: all read accesses; rejects child writes (UB), foreign writes (Disabled).
Disabled
represents: a dead pointer; allows: all foreign accesses; rejects: all child accesses (UB).
Implementations§
source§impl PermissionPriv
impl PermissionPriv
sourcefn is_initial(&self) -> bool
fn is_initial(&self) -> bool
Check if self
can be the initial state of a pointer.
Trait Implementations§
source§impl Clone for PermissionPriv
impl Clone for PermissionPriv
source§fn clone(&self) -> PermissionPriv
fn clone(&self) -> PermissionPriv
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PermissionPriv
impl Debug for PermissionPriv
source§impl Display for PermissionPriv
impl Display for PermissionPriv
source§impl Hash for PermissionPriv
impl Hash for PermissionPriv
source§impl PartialEq<PermissionPriv> for PermissionPriv
impl PartialEq<PermissionPriv> for PermissionPriv
source§fn eq(&self, other: &PermissionPriv) -> bool
fn eq(&self, other: &PermissionPriv) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PermissionPriv> for PermissionPriv
impl PartialOrd<PermissionPriv> for PermissionPriv
source§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
PermissionPriv is ordered as follows:
- Reserved(_) < Active < Frozen < Disabled;
- different kinds of
Reserved
(with or without interior mutability) are incomparable to each other.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PermissionPriv
impl Eq for PermissionPriv
impl StructuralEq for PermissionPriv
impl StructuralPartialEq for PermissionPriv
Auto Trait Implementations§
impl RefUnwindSafe for PermissionPriv
impl Send for PermissionPriv
impl Sync for PermissionPriv
impl Unpin for PermissionPriv
impl UnwindSafe for PermissionPriv
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
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:
Reserved
: 1 byteActive
: 0 bytesFrozen
: 0 bytesDisabled
: 0 bytes