Struct collection::Collection [] [src]

pub struct Collection<T, M> where
    T: Val,
    M: Meta<T>, 
{ pub root: Location<T, M>, pub stash: Stash<T, M>, pub divisor: usize, }

A collection of elements of type T, with metadata of type M.

This is the base type, that all the collection operations are implemented over.

Fields

The location on the stash that constitutes the root for this collection.

The store for values of type Node

The branching factor, currently hard-coded to 2, which means on average every fourth element will have weight > 0.

Methods

impl<T, M> Collection<T, M> where
    T: Val,
    M: Meta<T>, 
[src]

Returns a new, empty Collection.

Constructs a Collection given a root and a stash

Produces a html representation of this Collection. For debug use only.

Clones the collection, mutating self

Returns a new, cloned collection that is the result of a union operation given two Meta implementations F and E

F is used to select which T goes first in the union.

E is used to find overlapping common subtrees.

For Sets: F: Max<T>, E: CheckSum<T>, and for Maps: F: Key<T::Key>, E: KeySum<T>.

When the equality testing succeeds, elements will be picked from the Collection b.

Constructs a MutContext context, given a branch into the Collection.

impl<T, M> Collection<T, M> where
    T: Val,
    M: Meta<T>, 
[src]

Returns an iterator over Collection

Returns a reverse iterator over Collection

Trait Implementations

impl<T, M> PartialEq for Collection<T, M> where
    T: Val,
    M: Meta<T> + SubMeta<CheckSum<u64>>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.