pub trait Plain: Copy {
// Required method
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>;
}Expand description
A trait for types that can be extracted from snapshots in ghost code.
These are types that only contain plain data and whose ownership does not convey any additional information.
For example, Booleans and integers are plain, but references are not, be
they mutable or not. Indeed, the ownership of a shared reference can be used
to deduce facts, for example with Perm::disjoint_lemma.
Required Methods§
Sourcefn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Plain for bool
impl Plain for bool
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for char
impl Plain for char
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for i8
impl Plain for i8
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for i16
impl Plain for i16
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for i32
impl Plain for i32
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for i64
impl Plain for i64
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for i128
impl Plain for i128
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for isize
impl Plain for isize
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for u8
impl Plain for u8
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for u16
impl Plain for u16
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for u32
impl Plain for u32
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for u64
impl Plain for u64
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for u128
impl Plain for u128
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl Plain for usize
impl Plain for usize
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl<T> Plain for *const T
impl<T> Plain for *const T
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost
Source§impl<T> Plain for *mut T
impl<T> Plain for *mut T
Source§fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
fn into_ghost(snap: Snapshot<Self>) -> Ghost<Self>
ensures
*result == *snapterminates
ghost