pub struct Multiset<V> { /* private fields */ }Expand description
Multiset<V> is an abstract multiset type for specifications.
Multiset<V> can be encoded as a (total) map from elements to natural numbers,
where the number of nonzero entries is finite.
Multisets can be constructed in a few different ways:
- [
Multiset::empty] constructs an empty multiset. - [
Multiset::singleton] constructs a multiset that contains a single element with multiplicity 1. - [
Multiset::from_map] constructs a multiset from a map of elements to multiplicities. - By manipulating existings multisets with [
Multiset::add], [Multiset::insert], [Multiset::sub], [Multiset::remove], [Multiset::update], or [Multiset::filter]. - TODO:
multiset!constructor macro, multiset from set, from map, etc.
To prove that two multisets are equal, it is usually easiest to use the
extensionality operator =~=.
Auto Trait Implementations§
impl<V> Freeze for Multiset<V>where
PhantomData<V>: Freeze,
impl<V> RefUnwindSafe for Multiset<V>where
PhantomData<V>: RefUnwindSafe,
impl<V> Send for Multiset<V>where
PhantomData<V>: Send,
impl<V> Sync for Multiset<V>where
PhantomData<V>: Sync,
impl<V> Unpin for Multiset<V>where
PhantomData<V>: Unpin,
impl<V> UnsafeUnpin for Multiset<V>where
PhantomData<V>: UnsafeUnpin,
impl<V> UnwindSafe for Multiset<V>where
PhantomData<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