pub struct ReprPtr<R, T: Repr<R>> {
pub addr: usize,
pub ptr: PPtr<R>,
pub _T: PhantomData<T>,
}Expand description
Concrete representation of a pointer to an object of type T with representation type R The length of the array is not stored in the pointer
Fields§
§addr: usize§ptr: PPtr<R>§_T: PhantomData<T>Implementations§
Source§impl<R, T: Repr<R>> ReprPtr<R, T>
impl<R, T: Repr<R>> ReprPtr<R, T>
Sourcepub open spec fn new_spec(ptr: PPtr<R>) -> Self
pub open spec fn new_spec(ptr: PPtr<R>) -> Self
{
Self {
addr: ptr.addr(),
ptr: ptr,
_T: PhantomData,
}
}Sourcepub exec fn new_borrowed<'a>(ptr: &'a PPtr<R>) -> res : &'a Self
pub exec fn new_borrowed<'a>(ptr: &'a PPtr<R>) -> res : &'a Self
ensures
*res == Self::new_spec(*ptr),Sourcepub exec fn from_pptr(ptr: PPtr<R>) -> res : Self
pub exec fn from_pptr(ptr: PPtr<R>) -> res : Self
ensures
res == Self::new_spec(ptr),res.addr == ptr.addr(),res.ptr == ptr,Sourcepub exec fn take(self, Tracked(perm): Tracked<&mut PointsTo<R, T>>) -> v : T
pub exec fn take(self, Tracked(perm): Tracked<&mut PointsTo<R, T>>) -> v : T
requires
old(perm).pptr() == self,old(perm).is_init(),old(perm).wf(&old(perm).inner_perms),ensuresperm.pptr() == old(perm).pptr(),perm.mem_contents() == MemContents::Uninit::<T>,v == old(perm).value(),Trait Implementations§
impl<R, T: Repr<R>> Copy for ReprPtr<R, T>
Auto Trait Implementations§
impl<R, T> Freeze for ReprPtr<R, T>
impl<R, T> RefUnwindSafe for ReprPtr<R, T>where
T: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, T> Send for ReprPtr<R, T>
impl<R, T> Sync for ReprPtr<R, T>
impl<R, T> Unpin for ReprPtr<R, T>
impl<R, T> UnwindSafe for ReprPtr<R, T>where
T: UnwindSafe,
R: 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
Mutably borrows from an owned value. Read more