pub struct Map<K, V>where
K: DafnyTypeEq,
V: DafnyType,{ /* private fields */ }Implementations§
Source§impl<K: DafnyTypeEq, V: DafnyType> Map<K, V>
impl<K: DafnyTypeEq, V: DafnyType> Map<K, V>
pub fn new_empty() -> Map<K, V>
pub fn from_array(values: &Vec<(K, V)>) -> Map<K, V>
pub fn from_iterator<I>(data: I) -> Map<K, V>
pub fn from_hashmap_owned(values: HashMap<K, V>) -> Map<K, V>
pub fn to_hashmap_owned<K2, V2>( &self, converter_k: fn(&K) -> K2, converter_v: fn(&V) -> V2, ) -> HashMap<K2, V2>
pub fn cardinality_usize(&self) -> usize
pub fn cardinality(&self) -> DafnyInt
pub fn contains(&self, key: &K) -> bool
pub fn get_or_none(&self, key: &K) -> Option<V>
pub fn get(&self, key: &K) -> V
pub fn merge(&self, other: &Map<K, V>) -> Map<K, V>
pub fn subtract(&self, keys: &Set<K>) -> Self
pub fn from_hashmap<K2, V2>( map: &HashMap<K2, V2>, converter_k: fn(&K2) -> K, converter_v: fn(&V2) -> V, ) -> Map<K, V>
pub fn keys(&self) -> Set<K>
pub fn update_index(&self, index: &K, value: &V) -> Self
pub fn update_index_owned(&self, index: K, value: V) -> Self
pub fn iter_raw(&self) -> Iter<'_, K, V>
pub fn iter(&self) -> impl Iterator<Item = K> + '_
Source§impl<K: DafnyTypeEq, V: DafnyTypeEq> Map<K, V>
impl<K: DafnyTypeEq, V: DafnyTypeEq> Map<K, V>
Source§impl<K: DafnyTypeEq> Map<K, DafnyInt>
impl<K: DafnyTypeEq> Map<K, DafnyInt>
pub fn as_dafny_multiset(&self) -> Multiset<K>
Source§impl<K: DafnyTypeEq, U: DafnyTypeEq> Map<K, U>
impl<K: DafnyTypeEq, U: DafnyTypeEq> Map<K, U>
Trait Implementations§
Source§impl<K, V> DafnyPrint for Map<K, V>where
K: DafnyTypeEq,
V: DafnyType,
impl<K, V> DafnyPrint for Map<K, V>where
K: DafnyTypeEq,
V: DafnyType,
Source§impl<K, V> Debug for Map<K, V>where
K: DafnyTypeEq,
V: DafnyTypeEq,
impl<K, V> Debug for Map<K, V>where
K: DafnyTypeEq,
V: DafnyTypeEq,
Source§impl<K: DafnyTypeEq, V: DafnyType> NontrivialDefault for Map<K, V>
impl<K: DafnyTypeEq, V: DafnyType> NontrivialDefault for Map<K, V>
fn nontrivial_default() -> Self
Source§impl<K, V> PartialEq for Map<K, V>where
K: DafnyTypeEq,
V: DafnyTypeEq,
impl<K, V> PartialEq for Map<K, V>where
K: DafnyTypeEq,
V: DafnyTypeEq,
impl<K: DafnyTypeEq, V: DafnyTypeEq> Eq for Map<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for Map<K, V>
impl<K, V> RefUnwindSafe for Map<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> !Send for Map<K, V>
impl<K, V> !Sync for Map<K, V>
impl<K, V> Unpin for Map<K, V>
impl<K, V> UnwindSafe for Map<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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