Enum miri::borrow_tracker::stacked_borrows::NewPermission
source · enum NewPermission {
Uniform {
perm: Permission,
access: Option<AccessKind>,
protector: Option<ProtectorKind>,
},
FreezeSensitive {
freeze_perm: Permission,
freeze_access: Option<AccessKind>,
freeze_protector: Option<ProtectorKind>,
nonfreeze_perm: Permission,
nonfreeze_access: Option<AccessKind>,
},
}
Expand description
Indicates which permissions to grant to the retagged pointer.
Variants§
Uniform
FreezeSensitive
Fields
§
freeze_perm: Permission
§
freeze_access: Option<AccessKind>
§
freeze_protector: Option<ProtectorKind>
§
nonfreeze_perm: Permission
§
nonfreeze_access: Option<AccessKind>
Implementations§
source§impl NewPermission
impl NewPermission
sourcefn from_ref_ty<'tcx>(
ty: Ty<'tcx>,
kind: RetagKind,
cx: &MiriInterpCx<'_, 'tcx>
) -> Self
fn from_ref_ty<'tcx>( ty: Ty<'tcx>, kind: RetagKind, cx: &MiriInterpCx<'_, 'tcx> ) -> Self
A key function: determine the permissions to grant at a retag for the given kind of reference/pointer.
fn from_box_ty<'tcx>( ty: Ty<'tcx>, kind: RetagKind, cx: &MiriInterpCx<'_, 'tcx> ) -> Self
fn protector(&self) -> Option<ProtectorKind>
Trait Implementations§
source§impl Clone for NewPermission
impl Clone for NewPermission
source§fn clone(&self) -> NewPermission
fn clone(&self) -> NewPermission
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for NewPermission
impl Send for NewPermission
impl Sync for NewPermission
impl Unpin for NewPermission
impl UnwindSafe for NewPermission
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
Mutably borrows from an owned value. Read more
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: 6 bytes
Size for each variant:
Uniform
: 3 bytesFreezeSensitive
: 5 bytes