pub struct GhostSubmap<K, V> { /* private fields */ }
Implementations§
Source§impl<K, V> GhostSubmap<K, V>
impl<K, V> GhostSubmap<K, V>
Sourcepub open spec fn spec_index(self, key: K) -> V
pub open spec fn spec_index(self, key: K) -> V
recommends
self.dom().contains(key),
{ self@[key] }
Sourcepub proof fn dummy() -> tracked result : GhostSubmap<K, V>
pub proof fn dummy() -> tracked result : GhostSubmap<K, V>
Sourcepub proof fn empty(id: int) -> tracked result : GhostSubmap<K, V>
pub proof fn empty(id: int) -> tracked result : GhostSubmap<K, V>
ensures
result.id() == id,
result@ == Map::<K, V>::empty(),
Sourcepub proof fn take(tracked &mut self) -> tracked result : GhostSubmap<K, V>
pub proof fn take(tracked &mut self) -> tracked result : GhostSubmap<K, V>
ensures
result == *old(self),
Sourcepub proof fn agree(tracked self: &GhostSubmap<K, V>, tracked auth: &GhostMapAuth<K, V>)
pub proof fn agree(tracked self: &GhostSubmap<K, V>, tracked auth: &GhostMapAuth<K, V>)
requires
self.id() == auth.id(),
ensuresself@ <= auth@,
Sourcepub proof fn combine(tracked &mut self, tracked other: GhostSubmap<K, V>)
pub proof fn combine(tracked &mut self, tracked other: GhostSubmap<K, V>)
requires
old(self).id() == other.id(),
ensuresself.id() == old(self).id(),
self@ == old(self)@.union_prefer_right(other@),
old(self)@.dom().disjoint(other@.dom()),
Sourcepub proof fn disjoint(tracked &mut self, tracked other: &GhostSubmap<K, V>)
pub proof fn disjoint(tracked &mut self, tracked other: &GhostSubmap<K, V>)
requires
old(self).id() == other.id(),
ensuresself.id() == old(self).id(),
self@ == old(self)@,
self@.dom().disjoint(other@.dom()),
Sourcepub proof fn split(tracked &mut self, s: Set<K>) -> tracked result : GhostSubmap<K, V>
pub proof fn split(tracked &mut self, s: Set<K>) -> tracked result : GhostSubmap<K, V>
requires
s <= old(self)@.dom(),
ensuresself.id() == old(self).id(),
result.id() == self.id(),
old(self)@ == self@.union_prefer_right(result@),
result@.dom() =~= s,
self@.dom() =~= old(self)@.dom() - s,
Sourcepub proof fn update(tracked &mut self, tracked auth: &mut GhostMapAuth<K, V>, m: Map<K, V>)
pub proof fn update(tracked &mut self, tracked auth: &mut GhostMapAuth<K, V>, m: Map<K, V>)
requires
m.dom() <= old(self)@.dom(),
old(self).id() == old(auth).id(),
ensuresself.id() == old(self).id(),
auth.id() == old(auth).id(),
self@ == old(self)@.union_prefer_right(m),
auth@ == old(auth)@.union_prefer_right(m),
Auto Trait Implementations§
impl<K, V> Freeze for GhostSubmap<K, V>
impl<K, V> RefUnwindSafe for GhostSubmap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for GhostSubmap<K, V>
impl<K, V> Sync for GhostSubmap<K, V>
impl<K, V> Unpin for GhostSubmap<K, V>
impl<K, V> UnwindSafe for GhostSubmap<K, V>where
K: UnwindSafe,
V: 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