pub struct PointsTo<V> { /* private fields */ }Expand description
A tracked ghost object that gives the user permission to dereference a pointer
for reading or writing, or to free the memory at that pointer.
The meaning of a PointsTo object is given by the data in its
View object, PointsToData.
See the PPtr documentation for more details.
Implementations§
Source§impl<V> PointsTo<V>
impl<V> PointsTo<V>
Sourcepub closed spec fn mem_contents(&self) -> MemContents<V>
pub closed spec fn mem_contents(&self) -> MemContents<V>
Sourcepub proof fn is_nonnull(tracked &self)
pub proof fn is_nonnull(tracked &self)
self.addr() != 0,Guarantee that the PointsTo points to a non-null address.
Sourcepub proof fn leak_contents(tracked &mut self)
pub proof fn leak_contents(tracked &mut self)
self.pptr() == old(self).pptr(),self.is_uninit(),“Forgets” about the value stored behind the pointer.
Updates the PointsTo value to MemContents::Uninit.
Note that this is a proof function, i.e., it is operationally a no-op in executable code.
Sourcepub proof fn is_disjoint<S>(tracked &mut self, tracked other: &PointsTo<S>)
pub proof fn is_disjoint<S>(tracked &mut self, tracked other: &PointsTo<S>)
*old(self) == *self,self.addr() + size_of::<V>() <= other.addr()
|| other.addr() + size_of::<S>() <= self.addr(),Guarantees that two distinct PointsTo<V> objects point to disjoint ranges of memory.
If both S and V are non-zero-sized, then this also implies the pointers
have distinct addresses.
Sourcepub proof fn is_distinct<S>(tracked &mut self, tracked other: &PointsTo<S>)
pub proof fn is_distinct<S>(tracked &mut self, tracked other: &PointsTo<S>)
size_of::<V>() != 0,size_of::<S>() != 0,ensures*old(self) == *self,self.addr() != other.addr(),Guarantees that two distinct, non-ZST PointsTo<V> objects point to different
addresses. This is a corollary of PointsTo::is_disjoint.
Auto Trait Implementations§
impl<V> Freeze for PointsTo<V>
impl<V> RefUnwindSafe for PointsTo<V>where
V: RefUnwindSafe,
impl<V> Send for PointsTo<V>where
V: Send,
impl<V> Sync for PointsTo<V>where
V: Sync,
impl<V> Unpin for PointsTo<V>where
V: Unpin,
impl<V> UnwindSafe for PointsTo<V>where
V: UnwindSafe,
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, U> IntoSpecImpl<U> for Twhere
U: From<T>,
impl<T, U> IntoSpecImpl<U> for Twhere
U: From<T>,
Source§impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
impl<T, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryFrom<T>,
Source§exec fn obeys_try_from_spec() -> bool
exec fn obeys_try_from_spec() -> bool
Source§impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__Awhere
VERUS_SPEC__A: TryInto<T>,
Source§exec fn obeys_try_into_spec() -> bool
exec fn obeys_try_into_spec() -> bool
Source§impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryIntoSpecImpl<U> for Twhere
U: TryFrom<T>,
Source§open spec fn obeys_try_into_spec() -> bool
open spec fn obeys_try_into_spec() -> bool
{ <U as TryFromSpec<Self>>::obeys_try_from_spec() }