Struct vstd::raw_ptr::PointsToRaw
source · pub struct PointsToRaw { /* private fields */ }
Expand description
PointsToRaw Variable-sized uninitialized memory.
Permission is for an arbitrary set of addresses, not necessarily contiguous, and with a given provenance.
Implementations§
source§impl PointsToRaw
impl PointsToRaw
sourcepub open spec fn provenance(self) -> Provenance
pub open spec fn provenance(self) -> Provenance
{}
sourcepub open spec fn is_range(self, start: int, len: int) -> bool
pub open spec fn is_range(self, start: int, len: int) -> bool
{ super::set_lib::set_int_range(start, start + len) =~= self.dom() }
sourcepub open spec fn contains_range(self, start: int, len: int) -> bool
pub open spec fn contains_range(self, start: int, len: int) -> bool
{ super::set_lib::set_int_range(start, start + len) <= self.dom() }
sourcepub proof fn empty(provenance: Provenance) -> tracked points_to_raw : Self
pub proof fn empty(provenance: Provenance) -> tracked points_to_raw : Self
ensures
points_to_raw.dom() == Set::<int>::empty(),
points_to_raw.provenance() == provenance,
sourcepub proof fn split(tracked self, range: Set<int>) -> tracked res : (Self, Self)
pub proof fn split(tracked self, range: Set<int>) -> tracked res : (Self, Self)
requires
range.subset_of(self.dom()),
ensuresres.0.provenance() == self.provenance(),
res.1.provenance() == self.provenance(),
res.0.dom() == range,
res.1.dom() == self.dom().difference(range),
sourcepub proof fn join(tracked self, tracked other: Self) -> tracked joined : Self
pub proof fn join(tracked self, tracked other: Self) -> tracked joined : Self
requires
self.provenance() == other.provenance(),
ensuresjoined.provenance() == self.provenance(),
joined.dom() == self.dom() + other.dom(),
sourcepub proof fn into_typed<V>(tracked self, start: usize) -> tracked points_to : PointsTo<V>
pub proof fn into_typed<V>(tracked self, start: usize) -> tracked points_to : PointsTo<V>
requires
is_sized::<V>(),
start as int % align_of::<V>() as int == 0,
self.is_range(start as int, size_of::<V>() as int),
ensurespoints_to.ptr()
== ptr_mut_from_data::<
V,
>(PtrData {
addr: start,
provenance: self.provenance(),
metadata: Metadata::Thin,
}),
points_to.is_uninit(),
Auto Trait Implementations§
impl Freeze for PointsToRaw
impl RefUnwindSafe for PointsToRaw
impl Send for PointsToRaw
impl Sync for PointsToRaw
impl Unpin for PointsToRaw
impl UnwindSafe for PointsToRaw
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