[][src]Struct vertreap::VertreapMap

pub struct VertreapMap<K, V, P = u64> { /* fields omitted */ }

An ordered associative map backed by a persistent treap.

Methods

impl<K, V, P> VertreapMap<K, V, P> where
    Standard: Distribution<P>, 
[src]

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]

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]

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]

pub fn find(&self, key: &K) -> Option<Rc<KV<K, V>>>[src]

impl<K, V, P> VertreapMap<K, V, P> where
    K: Ord,
    P: Copy + Ord
[src]

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]

Trait Implementations

impl<K, V, P> Clone for 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]

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]

type Owned = T

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.