Struct vstd::ptr::PointsToRaw

source ·
pub struct PointsToRaw { /* private fields */ }
👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
Expand description

Points to uninitialized memory.

Implementations§

source§

impl PointsToRaw

source

pub spec fn view(self) -> Map<int, u8>

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
source

pub open spec fn contains_range(self, start: int, len: int) -> bool

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
{ set_int_range(start, start + len).subset_of(self@.dom()) }
source

pub open spec fn is_range(self, start: int, len: int) -> bool

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
{ set_int_range(start, start + len) =~= self@.dom() }
source

pub open spec fn spec_index(self, i: int) -> u8

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
{ self@[i] }
source

pub proof fn is_nonnull(tracked &self)

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
ensures
!self@.dom().contains(0),
source

pub proof fn is_in_bounds(tracked &self)

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
ensures
forall |i: int| self@.dom().contains(i) ==> 0 < i <= usize::MAX,
source

pub proof fn empty() -> tracked Self

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
ensures
points_to_raw@ == Map::<int, u8>::empty(),
source

pub proof fn into_typed<V>(tracked self, start: usize) -> PointsTo<V>

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
requires
is_sized::<V>(),
start as int % align_of::<V>() as int == 0,
self.is_range(start as int, size_of::<V>() as int),
ensures
points_to@.pptr == start,
points_to@.value === None,
source

pub proof fn borrow_typed<V>(tracked &self, start: int) -> tracked &PointsTo<V>

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
requires
is_sized::<V>(),
start % align_of::<V>() as int == 0,
self.contains_range(start, size_of::<V>() as int),
ensures
points_to@.pptr === start,
points_to@.value === None,
source

pub proof fn join(tracked self, tracked other: Self) -> tracked Self

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
ensures
self@.dom().disjoint(other@.dom()),
joined@ == self@.union_prefer_right(other@),
source

pub proof fn insert(tracked &mut self, tracked other: Self)

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
ensures
old(self)@.dom().disjoint(other@.dom()),
self@ == old(self)@.union_prefer_right(other@),
source

pub proof fn borrow_join<'a>(tracked &'a self, tracked other: &'a Self) -> &'a Self

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
ensures
(forall |i| {
    self@.dom().contains(i) && other@.dom().contains(i) ==> self@[i] == other@[i]
}),
joined@ == self@.union_prefer_right(other@),
source

pub proof fn split(tracked self, range: Set<int>) -> (Self, Self)

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
requires
range.subset_of(self@.dom()),
ensures
res.0@ == self@.restrict(range),
res.1@ == self@.remove_keys(range),
source

pub proof fn take(tracked &mut self, range: Set<int>) -> tracked Self

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
requires
range.subset_of(old(self)@.dom()),
ensures
res@ == old(self)@.restrict(range),
self@ == old(self)@.remove_keys(range),
source

pub proof fn borrow_subset(tracked &self, range: Set<int>) -> &Self

👎Deprecated: The vstd::ptr version of PPtr is deprecated. Use either: – PPtr<T> in vstd::simple_pptr (for simple use-cases, with fixed-size typed heap allocations) – *mut T with vstd::raw_ptr (for more advanced use-cases)
requires
range.subset_of(self@.dom()),
ensures
res@ == self@.restrict(range),

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.