pub enum MemContents<T> {
Uninit,
Init(T),
}
Expand description
Represents (typed) contents of memory.
Variants§
Uninit
Represents uninitialized memory.
Init(T)
Represents initialized memory with the given value of type T
.
Implementations§
Source§impl<T> MemContents<T>
impl<T> MemContents<T>
pub fn arrow_0(self) -> T
pub fn arrow_Init_0(self) -> T
Source§impl<T> MemContents<T>
impl<T> MemContents<T>
Sourcepub open spec fn is_init(&self) -> bool
pub open spec fn is_init(&self) -> bool
{ self is Init }
Returns true
if it is a MemContents::Init
value.
Sourcepub open spec fn is_uninit(&self) -> bool
pub open spec fn is_uninit(&self) -> bool
{ self is Uninit }
Returns true
if it is a MemContents::Uninit
value.
Sourcepub open spec fn value(&self) -> T
pub open spec fn value(&self) -> T
recommends
self is Init,
{ self->0 }
If it is a MemContents::Init
value, returns the value.
Otherwise, the return value is meaningless.
Auto Trait Implementations§
impl<T> Freeze for MemContents<T>where
T: Freeze,
impl<T> RefUnwindSafe for MemContents<T>where
T: RefUnwindSafe,
impl<T> Send for MemContents<T>where
T: Send,
impl<T> Sync for MemContents<T>where
T: Sync,
impl<T> Unpin for MemContents<T>where
T: Unpin,
impl<T> UnwindSafe for MemContents<T>where
T: 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