InvCell

Struct InvCell 

Source
pub struct InvCell<T> { /* private fields */ }
๐Ÿ‘ŽDeprecated: use vstd::cell::invcell::InvCell instead
Expand description

Now deprecated See invcell::InvCell instead

Implementationsยง

Sourceยง

impl<T> InvCell<T>

Source

pub closed spec fn inv(&self, val: T) -> bool

Source

pub exec fn new(val: T, Ghost(f): Ghost<FnSpec<(T,), bool>>) -> cell : Self

requires
f(val),
ensures
forall |v| f(v) <==> cell.inv(v),
Sourceยง

impl<T> InvCell<T>

Source

pub exec fn replace(&self, val: T) -> old_val : T

requires
self.inv(val),
ensures
self.inv(old_val),
Sourceยง

impl<T: Copy> InvCell<T>

Source

pub exec fn get(&self) -> val : T

ensures
self.inv(val),

Auto Trait Implementationsยง

ยง

impl<T> !Freeze for InvCell<T>

ยง

impl<T> !RefUnwindSafe for InvCell<T>

ยง

impl<T> Send for InvCell<T>
where T: Send,

ยง

impl<T> !Sync for InvCell<T>

ยง

impl<T> Unpin for InvCell<T>
where T: Unpin,

ยง

impl<T> UnwindSafe for InvCell<T>

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, VERUS_SPEC__A> FromSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: From<T>,

Sourceยง

exec fn obeys_from_spec() -> bool

Sourceยง

exec fn from_spec(v: T) -> VERUS_SPEC__A

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, VERUS_SPEC__A> IntoSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: Into<T>,

Sourceยง

exec fn obeys_into_spec() -> bool

Sourceยง

exec fn into_spec(self) -> T

Sourceยง

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

Sourceยง

open spec fn obeys_into_spec() -> bool

{ <U as FromSpec<Self>>::obeys_from_spec() }
Sourceยง

open spec fn into_spec(self) -> U

{ U::from_spec(self) }
Sourceยง

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

Sourceยง

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, VERUS_SPEC__A> TryFromSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: TryFrom<T>,

Sourceยง

exec fn obeys_try_from_spec() -> bool

Sourceยง

exec fn try_from_spec( v: T, ) -> Result<VERUS_SPEC__A, <VERUS_SPEC__A as TryFrom<T>>::Error>

Sourceยง

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

Sourceยง

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.
Sourceยง

impl<T, VERUS_SPEC__A> TryIntoSpec<T> for VERUS_SPEC__A
where VERUS_SPEC__A: TryInto<T>,

Sourceยง

exec fn obeys_try_into_spec() -> bool

Sourceยง

exec fn try_into_spec(self) -> Result<T, <VERUS_SPEC__A as TryInto<T>>::Error>

Sourceยง

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

Sourceยง

open spec fn obeys_try_into_spec() -> bool

{ <U as TryFromSpec<Self>>::obeys_try_from_spec() }
Sourceยง

open spec fn try_into_spec(self) -> Result<U, <U as TryFrom<T>>::Error>

{ <U as TryFromSpec<Self>>::try_from_spec(self) }