linked_hash_set
A linked hash set implemented as a linked_hash_map::LinkedHashMap
where the value is ()
, in a similar way std HashSet
is implemented from HashMap
.
General usage is very similar to a std HashSet
. However, a LinkedHashSet
maintains insertion order using a doubly-linked list running through its entries.
As such methods front()
, pop_front()
, back()
and pop_back()
are provided.
extern crate linked_hash_set;
use LinkedHashSet;
let mut set = new;
set.insert;
set.insert;
set.insert;
set.insert;
assert_eq!;