All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Map
now implementsIndex
andIndexMut
.&mut Map
now implementsIntoIterator
.
Map::clear()
/Set::clear()
have been added to clear the contents of the collections.Map::shrink_to[_fit]()
/Set::shrink_to[_fit]()
have been added to allow shrinking an existing collection's allocation.
Set::drain
returns an iterator that drains the contents of the set.Set
now implementsSerialize
andDeserialize
when theserde
feature is enabled.Set
andMap
now implementHash
.Set::capacity
returns the currently allocated capacity.
Map::get_mut
andMap::get_field_mut
provide exclusive access to the fields that are found.Set::remove_member
removes a member by index.Set
now implementsDebug
,Ord
,Eq
, andClone
.
Set<T>
is a new ordered collection type for this crate. It is similar to BTreeSet, but uses this crate'sMap
type under the hood.Map::insert_with
takes a closure for the value and only invokes the closure if they key is not found in the collection. If the key is found in the collection, the map is left unchanged and the key provided to this function is returned.Map::get_field
returns theField
contained within the map, allowing access to both the Key and value.Map::keys
/Map::into_keys
return iterators over the keys of a Map.Map::union
/Map::intersection
/Map::difference
are new functions that return iterators that efficiently perform the "set" operations.Field::into_key
takes ownership of the field and returns the owned Key.Field::into_parts
takes ownership of the field and returns a(Key, Value)
tuple.Entry::or_default
inserts a default value for the entry if it is vacant. A mutable reference to the entry's value is returned.VacantEntry::key
returns a reference to the key being inserted.
Initial release.