pub struct Provenance<'ctx> {
pub alloc_id: AllocId,
pub offset: Int<'ctx>,
pub is_field_offset: bool,
}Expand description
Pointer provenance: which allocation and at what byte offset.
Fields§
§alloc_id: AllocIdThe allocation this pointer derives from.
offset: Int<'ctx>Byte offset from the allocation base. A freshly created
pointer to the base of an allocation has offset = 0.
is_field_offset: boolWhether offset is a compile-time field offset (offset_of!). Such an
offset always satisfies 0 <= offset and offset + size_of(field) <= size_of(container), which the verifier uses to discharge in-bounds
checks for patterns like Option::as_slice.
Trait Implementations§
Source§impl<'ctx> Clone for Provenance<'ctx>
impl<'ctx> Clone for Provenance<'ctx>
Source§fn clone(&self) -> Provenance<'ctx>
fn clone(&self) -> Provenance<'ctx>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<'ctx> !DynSend for Provenance<'ctx>
impl<'ctx> !DynSync for Provenance<'ctx>
impl<'ctx> !Send for Provenance<'ctx>
impl<'ctx> !Sync for Provenance<'ctx>
impl<'ctx> Freeze for Provenance<'ctx>
impl<'ctx> RefUnwindSafe for Provenance<'ctx>
impl<'ctx> Unpin for Provenance<'ctx>
impl<'ctx> UnsafeUnpin for Provenance<'ctx>
impl<'ctx> UnwindSafe for Provenance<'ctx>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more