pub struct PCellOwn<T: ?Sized> {
pub id: Id,
pub val: Box<T>,
/* private fields */
}
Expand description
Fields§
§id: Id
§val: Box<T>
Implementations§
Source§impl<T> PCellOwn<T>where
T: ?Sized,
impl<T> PCellOwn<T>where
T: ?Sized,
Sourcepub fn id(self) -> Id
pub fn id(self) -> Id
Returns the logical identity of the cell.
To use a [Pcell
], this and PCell::id
must agree.
logic
self.id
Sourcepub fn disjoint_lemma(own1: &mut PCellOwn<T>, own2: &PCellOwn<T>)
pub fn disjoint_lemma(own1: &mut PCellOwn<T>, own2: &PCellOwn<T>)
If one owns two PCellOwn
s in ghost code, then they have different ids.
pure
ensures
own1.id() != own2.id()
ensures
*own1 == ^own1
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for PCellOwn<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for PCellOwn<T>
impl<T> !Send for PCellOwn<T>
impl<T> !Sync for PCellOwn<T>
impl<T> Unpin for PCellOwn<T>where
T: ?Sized,
impl<T> !UnwindSafe for PCellOwn<T>
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
Source§impl<T> MakeSized for Twhere
T: ?Sized,
impl<T> MakeSized for Twhere
T: ?Sized,
Source§fn make_sized(&self) -> Box<T>
fn make_sized(&self) -> Box<T>
logic ⚠
ensures
*result == *self