Struct vstd::hash_set::HashSetWithView
source · pub struct HashSetWithView<Key>{ /* private fields */ }
Implementations§
source§impl<Key> HashSetWithView<Key>
impl<Key> HashSetWithView<Key>
sourcepub exec fn new() -> result : Self
pub exec fn new() -> result : Self
requires
obeys_key_model::<Key>(),
forall |k1: Key, k2: Key| @ == @ ==> k1 == k2,
ensures@ == Set::<<Key as View>::V>::empty(),
sourcepub exec fn with_capacity(capacity: usize) -> result : Self
pub exec fn with_capacity(capacity: usize) -> result : Self
requires
obeys_key_model::<Key>(),
forall |k1: Key, k2: Key| @ == @ ==> k1 == k2,
ensures@ == Set::<<Key as View>::V>::empty(),
sourcepub exec fn insert(&mut self, k: Key) -> result : bool
pub exec fn insert(&mut self, k: Key) -> result : bool
ensures
@ == @.insert(@) && result == !@.contains(@),
sourcepub exec fn remove(&mut self, k: &Key) -> result : bool
pub exec fn remove(&mut self, k: &Key) -> result : bool
ensures
@ == @.remove(@) && result == @.contains(@),
Trait Implementations§
Auto Trait Implementations§
impl<Key> Freeze for HashSetWithView<Key>
impl<Key> RefUnwindSafe for HashSetWithView<Key>where
Key: RefUnwindSafe,
impl<Key> Send for HashSetWithView<Key>where
Key: Send,
impl<Key> Sync for HashSetWithView<Key>where
Key: Sync,
impl<Key> Unpin for HashSetWithView<Key>where
Key: Unpin,
impl<Key> UnwindSafe for HashSetWithView<Key>where
Key: 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