pub struct NewPermission {
freeze_perm: Permission,
freeze_access: bool,
nonfreeze_perm: Permission,
nonfreeze_access: bool,
outside_perm: Permission,
protector: Option<ProtectorKind>,
}
Expand description
Policy for a new borrow.
Fields§
§freeze_perm: Permission
Permission for the frozen part of the range.
freeze_access: bool
Whether a read access should be performed on the frozen part on a retag.
nonfreeze_perm: Permission
Permission for the non-frozen part of the range.
nonfreeze_access: bool
Whether a read access should be performed on the non-frozen part on a retag.
outside_perm: Permission
Permission for memory outside the range.
protector: Option<ProtectorKind>
Whether this pointer is part of the arguments of a function call.
protector
is Some(_)
for all pointers marked noalias
.
Implementations§
Source§impl<'tcx> NewPermission
impl<'tcx> NewPermission
Sourcefn new(
pointee: Ty<'tcx>,
ref_mutability: Option<Mutability>,
retag_kind: RetagKind,
cx: &MiriInterpCx<'tcx>,
) -> Option<Self>
fn new( pointee: Ty<'tcx>, ref_mutability: Option<Mutability>, retag_kind: RetagKind, cx: &MiriInterpCx<'tcx>, ) -> Option<Self>
Determine NewPermission of the reference/Box from the type of the pointee.
A ref_mutability
of None
indicates a Box
type.
Trait Implementations§
Source§impl Clone for NewPermission
impl Clone for NewPermission
Source§fn clone(&self) -> NewPermission
fn clone(&self) -> NewPermission
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NewPermission
impl Debug for NewPermission
impl Copy for NewPermission
Auto Trait Implementations§
impl Freeze for NewPermission
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
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: 6 bytes