All notable changes to this project will be documented in this file.
Nothing
Nothing
Nothing
into_keysDHashMapmethod that creates a consuming iterator visiting all the keys in arbitrary order;into_valuesDHashMapmethod that creates a consuming iterator visiting all the values in arbitrary order;Extendtrait implementation forDHashMapwas expanded (addExtend<&'a (K1, K2, V)>);
Updated documentations and examples of some methods and structures (Iter, Keys, Values, Drain, IntoIter
structures, IntoIterator trait implementations documentations, etc.)
Nothing
Nothing
Eqtrait implementation forDHashMap;IntoIteratortrait implementation forDHashMap;
Nothing
Nothing
Nothing
drainDHashMapmethod that clears the map, returning all keys-value tuples as an arbitrary order iterator;get_mut_keysDHashMapmethod that returns a mutable reference to the value corresponding to the given primary key(key #1)and secondary key(key #2)if they both exist and refer to the same value;remove_keysDHashMapmethod that removes element from the map corresponding to the given primary key(key #1)and secondary key(key #2)returning the value at the keys if the keys was previously in the map and refer to the same value;- Add some clarifications to
capacity,len,is_emptymethods documentations.
Nothing
Nothing
Nothing
Improve realizations of some methods (get_key1, get_key2, get_keys, get_key1_value, get_key2_value,
get_keys_value, contains_keys, get_mut_key1, get_mut_key2, remove_key1, remove_key2, insert_unchecked)
- Removed unnecessary lifetime bounds on implementations of
ExactSizeIteratorforIter,Keys,Values,IterMut,ValuesMutstructures; - Removed
K1: CloneandK2: Clonebounds for allVacantEntrymethods exceptinsertmethod; - Removed unnecessary
K1: Eq + HashandK2: Eq + Hashbounds for allEntrymethods. RemainedK1: CloneandK2: Clonebounds only for the methods that need on it. - Removed unnecessary
K1: Eq + Hash + CloneandK2: Eq + Hash + Cloneon implementations ofDisplayandErrortraits forOccupiedErrorstructure. - Removed unnecessary
K1: Eq + Hash + CloneandK2: Eq + Hash + Cloneon implementations ofDisplayandErrortraits forTryInsertErrorstructure.
Nothing
get_keysDHashMapmethod that returns a reference to the value corresponding to the given primary key and secondary key if they both exist and refer to the same value;get_key1_valueDHashMapmethod that returns a reference to the key-value pair corresponding to the given primary key: return the tuple of type(&'a K1, &'a V);get_key2_valueDHashMapmethod that returns a reference to the key-value pair corresponding to the given secondary key: return the tuple of type(&'a K2, &'a V);get_keys_valueDHashMapmethod that returns a reference to the keys-value tuple corresponding to the given primary key and secondary key if they both exist and refer to the same value: return the tuple of type(&'a K1, &'a K2, &'a V);
Fixed several typos in previous documentation.
Nothign
Nothing
contains_key1DHashMapmethod that returns true if the map contains a value for the specified primary key;contains_key2DHashMapmethod that returns true if the map contains a value for the specified secondary key;contains_keysDHashMapmethod that returns true if the map contains a value for the specified primary key and secondary key and also they both refer to the same value;
Nothign
Nothign
Nothing
keysDHashMapmethod for creation an iterator visiting all keys in arbitrary order;valuesDHashMapmethod for creation an iterator visiting all values in arbitrary order;values_mutDHashMapmethod for creation an iterator visiting all values mutably in arbitrary order.
Nothign
Nothign
Nothing
iter_mutDHashMapmethod for creation an iterator visiting all keys-value tuples in arbitrary order, with mutable references to the values.
Nothign
Nothign
Nothing
Nothing
Improved iter DHashMap method documentation.
Nothign
Nothing
iterDHashMapmethod for creation an iterator visiting all keys-value tuples in arbitrary order.
Nothign
Nothign
Nothing
Defaulttrait implementation forDHashMap;dhashmap!for creation aDHashMap<K1, K2, V,RandomState>from a list of sequentially given keys and values;- Add documentation for
Extendtrait; - Add documentation for
FromIteratortrait.
Nothign
Nothign
Nothing
Extendtrait implementation forDHashMap;FromIteratortrait implementation forDHashMap.
- Documentation was improved;
DHashMapwas moved to separate moduledhash_map;TryInsertError::Othervariant changed to theTryInsertError::Insertvariant.
Nothign
DHashMap::entrymethod (and through thisDHashMap::try_insert,DHashMap::insertmethods) realizations was changed.
- Because of moving
DHashMapto the separate moduledhash_map,EntryErrorstructure,InsertErrorstructure,OccupiedEntrystructure,OccupiedErrorstructure,VacantEntrystructure,Entryenum,ErrorKindenum,TryInsertErrorenum can not be used directly from crate root likeuse double_map::DHashMap. You need change syntax to use submodule, like thisuse double_map::dhash_map::EntryError; TryInsertError::Othervariant changed to theTryInsertError::Insertvariant.
Nothign
Nothing
Initial publication. Created DHashmap data structure, and add some methods to it1:
new: creates a new emptyDHashMap;with_capacity: creates an emptyDHashMapwith the specified capacity;with_hasher: creates an emptyDHashMapwhich will use the given hash builder to hash keys;with_capacity_and_hasher: creates an emptyDHashMapwith the specified capacity, usinghash_builderto hash the keys;capacity: returns the number of elements the map can hold without reallocating;len: returns the number of elements in the map.;is_empty: returnstrueif the map contains no elements;clear: clears the map, removing all keys-value tuples(K1, K2, V). Keeps the allocated memory for reuse;hasher: returns a reference to the map'sBuildHasher;reserve: reserves capacity for at leastadditionalmore elements;try_reserve: tries to reserve capacity for at leastadditionalmore elements;shrink_to_fit: shrinks the capacity of the map as much as possible;shrink_to: shrinks the capacity of the map with a lower limit;entry: tries to gets the given keys' corresponding entry in the map for in-place manipulation; return error if primaryK1key or secondaryK2not both vacant or exist and refers to the same value. Given keys returned insideerrorstructure;get_key1: returns a reference to the value corresponding to the given primary key(K1);get_key2: returns a reference to the value corresponding to the given secondary key(K2);get_mut_key1: returns a mutable reference to the value corresponding to the given primary key(K1);get_mut_key2: returns a reference to the value corresponding to the given secondary key(K2);insert_unchecked: insert keys-value tuple(K1, K2, V)into the map without checking that primaryK1key or secondaryK2key vacant or exist in map and refers to the same value;insert: insert keys-value tuple(K1, K2, V)into the map(K1, K2, V)with checking that primaryK1key or secondaryK2key vacant or exist in map and refers to the same value; return error if its failure. Given keys and value returned insideerrorstructure;try_insert: tries insert keys-value tuple(K1, K2, V)into the map if they vacant and returning error if any of keys or both keys exist in the map. Given value or value and keys together returned insideerrorenum (depends error type);remove_key1: remove element from map corresponding to the given primary key(K1);remove_key2: remove element from map corresponding to the given secondary key(K2).
Nothign
Nothign
Nothing
Footnotes
-
The
K1,K2,Vabbreviations means:K1- a primary key of typeK1;K2- a secondary key of typeK2;V- a value of typeK2. ↩