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 for ProtectorKind
impl PartialEq for ProtectorKind
impl Copy for ProtectorKind
impl Eq for ProtectorKind
impl StructuralPartialEq for ProtectorKind
Auto Trait Implementations§
impl Freeze for ProtectorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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