Skip to main content

ExecMemContents

Enum ExecMemContents 

Source
pub enum ExecMemContents<T> {
    Uninit,
    Init(T),
}
Expand description

MemContents<T> is compiled to ExecMemContents<T>

Variants§

§

Uninit

§

Init(T)

Implementations§

Source§

impl<T> ExecMemContents<T>

Source

pub fn arrow_0(self) -> T

Source

pub fn arrow_Init_0(self) -> T

Source§

impl<T: DeepView> ExecMemContents<T>

Source

pub exec fn exec_is_Init(&self) -> res : bool

ensures
res == self.deep_view() is Init,
Source

pub exec fn exec_is_Uninit(&self) -> res : bool

ensures
res == self.deep_view() is Uninit,
Source

pub exec fn exec_arrow_Init_0(&self) -> res : &T

requires
self.deep_view() is Init,
ensures
res.deep_view() == self.deep_view()->Init_0,
Source

pub exec fn exec_arrow_0(&self) -> res : &T

requires
self.deep_view() is Init,
ensures
res.deep_view() == self.deep_view()->0,

Trait Implementations§

Source§

impl<T: Debug> Debug for ExecMemContents<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: DeepView> DeepView for ExecMemContents<T>

Implementations for shared traits

Source§

open spec fn deep_view(&self) -> Self::V

{
    match self {
        ExecMemContents::Uninit => MemContents::Uninit,
        ExecMemContents::Init(t) => MemContents::Init(t.deep_view()),
    }
}
Source§

type V = MemContents<<T as DeepView>::V>

Source§

impl<T: DeepViewClone> DeepViewClone for ExecMemContents<T>

Source§

exec fn deep_clone(&self) -> Self

Source§

impl<T: Eq> Eq for ExecMemContents<T>

Source§

impl<'a, T> ExecSpecMemContents<'a> for &'a ExecMemContents<T>

Impls for MemContents methods

Source§

open spec fn is_init_spec(&self) -> bool

{ self.deep_view() is Init }
Source§

exec fn exec_is_init(self) -> res : bool

ensures
res == self.deep_view().is_init(),
Source§

exec fn exec_is_uninit(self) -> res : bool

ensures
res == self.deep_view().is_uninit(),
Source§

exec fn exec_value(self) -> res : Self::Elem

ensures
res.deep_view() == self.deep_view()->0,
Source§

type Elem = T

Source§

impl<T: Hash> Hash for ExecMemContents<T>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T: ObeysDeepEq> ObeysDeepEq for ExecMemContents<T>

Source§

impl<T: PartialEq> PartialEq for ExecMemContents<T>

Source§

fn eq(&self, other: &ExecMemContents<T>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<T: ObeysDeepEq> PartialEqSpecImpl for ExecMemContents<T>

Available on verus_keep_ghost only.
Source§

open spec fn obeys_eq_spec() -> bool

{ true }
Source§

open spec fn eq_spec(&self, other: &Self) -> bool

{ self.deep_view() == other.deep_view() }
Source§

impl<T: PartialEq> StructuralPartialEq for ExecMemContents<T>

Source§

impl<'a, T: DeepView + DeepViewClone> ToOwned<ExecMemContents<T>> for &'a ExecMemContents<T>

Source§

exec fn get_owned(self) -> ExecMemContents<T>

Source§

impl<'a, T: DeepView> ToRef<&'a ExecMemContents<T>> for &'a ExecMemContents<T>

Source§

exec fn get_ref(self) -> &'a ExecMemContents<T>

Auto Trait Implementations§

§

impl<T> Freeze for ExecMemContents<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for ExecMemContents<T>
where T: RefUnwindSafe,

§

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

§

impl<T> Sync for ExecMemContents<T>
where T: Sync,

§

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

§

impl<T> UnsafeUnpin for ExecMemContents<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for ExecMemContents<T>
where T: UnwindSafe,

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<Borrowed, VERUS_SPEC__A> BorrowSpec<Borrowed> for VERUS_SPEC__A
where VERUS_SPEC__A: Borrow<Borrowed> + ?Sized, Borrowed: ?Sized,

Source§

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

Source§

open spec fn obeys_borrow_spec() -> bool

{ true }
Source§

open spec fn borrow_spec(&self) -> &T

{ self }
Source§

impl<VERUS_SPEC__A> DebugSpec for VERUS_SPEC__A
where VERUS_SPEC__A: Debug + ?Sized,

Source§

exec fn fmt_req(&self, f: &Formatter<'_>) -> bool

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> FromSpecImpl<T> for T

Source§

open spec fn obeys_from_spec() -> bool

{ true }
Source§

open spec fn from_spec(v: T) -> T

{ v }
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 as FromSpec<Self>>::from_spec(self) }
Source§

impl<A, Rhs> PartialEqIs<Rhs> for A
where A: PartialEq<Rhs> + ?Sized, Rhs: ?Sized,

Source§

open spec fn is_eq(&self, other: &Rhs) -> bool

{ self.eq_spec(other) }
Source§

open spec fn is_ne(&self, other: &Rhs) -> bool

{ !self.eq_spec(other) }
Source§

impl<Rhs, VERUS_SPEC__A> PartialEqSpec<Rhs> for VERUS_SPEC__A
where VERUS_SPEC__A: PartialEq<Rhs> + ?Sized, Rhs: ?Sized,

Source§

exec fn obeys_eq_spec() -> bool

Source§

exec fn eq_spec(&self, other: &Rhs) -> bool

§

impl<A> SpecEq<&A> for A
where A: ?Sized,

§

impl<A> SpecEq<&mut A> for A
where A: ?Sized,

§

impl<A> SpecEq<A> for A
where A: ?Sized,

§

impl<A> SpecEq<Ghost<A>> for A

§

impl<A> SpecEq<Tracked<A>> for A

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) }