[−][src]Struct vertreap::VertreapMap
An ordered associative map backed by a persistent treap.
Methods
impl<K, V, P> VertreapMap<K, V, P> where
Standard: Distribution<P>,
[src]
Standard: Distribution<P>,
pub fn new() -> VertreapMap<K, V, P>
[src]
Equivalent to new_with_thread_rng
.
pub fn new_with_thread_rng() -> VertreapMap<K, V, P>
[src]
Create a new persistent treap-backed map, where priorities are generated
by ThreadRng
.
pub fn new_with_rng<R: Rng + 'static>(rng: R) -> VertreapMap<K, V, P>
[src]
Create a new persistent treap-backed map, where priorities are generated
by a provided Rng
.
impl<K, V> VertreapMap<K, V, u64> where
K: Hash,
[src]
K: Hash,
pub fn new_with_random_hasher() -> VertreapMap<K, V, u64>
[src]
Create a new persistent treap-backed map, where priorities are generated
by a randomly seeded hasher (the same as used for HashMap
).
impl<K, V, P> VertreapMap<K, V, P>
[src]
pub fn len(&self) -> usize
[src]
Count the number of key-value pairs in the map.
ⓘImportant traits for VertreapMapIter<K, V, P>pub fn iter(&self) -> VertreapMapIter<K, V, P>
[src]
ⓘImportant traits for VertreapMapIter<K, V, P>
Create an ordered iterator over the key-value pairs in the map.
The iterator performs an in-order depth-first traversal of the backing treap using a stack.
impl<K, V, P> VertreapMap<K, V, P> where
K: Ord,
[src]
K: Ord,
impl<K, V, P> VertreapMap<K, V, P> where
K: Ord,
P: Copy + Ord,
[src]
K: Ord,
P: Copy + Ord,
pub fn append(&self, key: K, val: V) -> VertreapMap<K, V, P>
[src]
pub fn append_with_priority(
&self,
priority: P,
key: K,
val: V
) -> VertreapMap<K, V, P>
[src]
&self,
priority: P,
key: K,
val: V
) -> VertreapMap<K, V, P>
Trait Implementations
impl<K, V, P> Clone for VertreapMap<K, V, P>
[src]
fn clone(&self) -> VertreapMap<K, V, P>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<K, V, P> Default for VertreapMap<K, V, P> where
Standard: Distribution<P>,
[src]
Standard: Distribution<P>,
fn default() -> VertreapMap<K, V, P>
[src]
Auto Trait Implementations
impl<K, V, P = u64> !Send for VertreapMap<K, V, P>
impl<K, V, P = u64> !Sync for VertreapMap<K, V, P>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,