[][src]Trait dynamization::Static

pub trait Static where
    Self: Sized
{ pub fn len(&self) -> usize;
pub fn merge_with(self, other: Self) -> Self; }

A trait that a static container must implement to become dynamizable.

Required methods

pub fn len(&self) -> usize[src]

Size of the container.

Best measured with the number of single-element insertions needed to make such a container.

If the size can't be determined (i.e. the container doesn't have any way of defining single-element insertion), return 1 and use some strategy which doesn't rely on knowing correct sizes: e.g. SimpleBinary or SkewBinary.

pub fn merge_with(self, other: Self) -> Self[src]

Merges two containers into one.

One possible way to implement this is to collect both containers and then make a new container from all the elements collected.

Loading content...

Implementors

impl<T: Ord> Static for SortedVec<T>[src]

Loading content...