Enum miri::borrow_tracker::ProtectorKind
source · pub enum ProtectorKind {
WeakProtector,
StrongProtector,
}
Expand description
The flavor of the protector.
Variants§
WeakProtector
Protected against aliasing violations from other pointers.
Items protected like this cause UB when they are invalidated, but the pointer itself may still be used to issue a deallocation.
This is required for LLVM IR pointers that are noalias
but not dereferenceable
.
StrongProtector
Protected against any kind of invalidation.
Items protected like this cause UB when they are invalidated or the memory is deallocated.
This is strictly stronger protection than WeakProtector
.
This is required for LLVM IR pointers that are dereferenceable
(and also allows noalias
).
Trait Implementations§
source§impl Clone for ProtectorKind
impl Clone for ProtectorKind
source§fn clone(&self) -> ProtectorKind
fn clone(&self) -> ProtectorKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProtectorKind
impl Debug for ProtectorKind
source§impl PartialEq<ProtectorKind> for ProtectorKind
impl PartialEq<ProtectorKind> for ProtectorKind
source§fn eq(&self, other: &ProtectorKind) -> bool
fn eq(&self, other: &ProtectorKind) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ProtectorKind
impl Eq for ProtectorKind
impl StructuralEq for ProtectorKind
impl StructuralPartialEq for ProtectorKind
Auto Trait Implementations§
impl RefUnwindSafe for ProtectorKind
impl Send for ProtectorKind
impl Sync for ProtectorKind
impl Unpin for ProtectorKind
impl UnwindSafe for ProtectorKind
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:
WeakProtector
: 0 bytesStrongProtector
: 0 bytes