pub struct Authority<K, V>(/* private fields */);Expand description
Implementations§
Source§impl<K, V> Authority<K, V>
impl<K, V> Authority<K, V>
Sourcepub fn new() -> Ghost<Self>
pub fn new() -> Ghost<Self>
Create a new, empty authoritative map.
terminates
ghost
ensures
result@ == FMap::empty()Sourcepub fn insert(&mut self, k: Snapshot<K>, v: Snapshot<V>) -> Fragment<K, V>
pub fn insert(&mut self, k: Snapshot<K>, v: Snapshot<V>) -> Fragment<K, V>
Insert a new element in the authoritative map and return the corresponding fragment.
requires
!self@.contains(*k)ensures
(^self)@ == self@.insert(*k, *v)ensures
(^self).id() == self.id()ensures
result@ == (*k, *v)ensures
result.id() == self.id()terminates
ghost
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for Authority<K, V>
impl<K, V> RefUnwindSafe for Authority<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Authority<K, V>
impl<K, V> Sync for Authority<K, V>
impl<K, V> Unpin for Authority<K, V>
impl<K, V> UnwindSafe for Authority<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