Struct makods::jostletree::JostleTree[][src]

pub struct JostleTree<N, T> { /* fields omitted */ }

The JostleTree can be thought of as efficiently modelling a sequence of items of variable widths. It allows operations such as

  • jumping to a position and getting whatever item is there

  • resizing items, in so doing, repositioning every one of the items after it

  • inserting and removing

Operations generally have logarithmic runtime.

Methods

impl<N, T> JostleTree<N, T> where
    N: Numeric
[src]

returns the sum of the spans of all of the items (logarithmic runtime)

inserts at or before whatever is at_offset.

inserts at the back

inserts at the front

returns the bucket at the offset o

negative or out of bounds o values will get first and last thing respectively. returns None if tree is empty.

negative or out of bounds o values will hit the first and last thing respectively. returns None if tree is empty.

negative or out of bounds o values will get first and last thing respectively. returns None if tree is empty.

Important traits for JostleTreeIter<'a, N, T>

Iterates over the buckets

Trait Implementations

impl<N: Debug, T: Debug> Debug for JostleTree<N, T>
[src]

Formats the value using the given formatter. Read more

impl<N: Numeric + Display, T: Display> Display for JostleTree<N, T>
[src]

Formats the value using the given formatter. Read more

impl<N: Numeric + Hash, T: Hash> Hash for JostleTree<N, T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<N: Numeric, T: PartialEq> PartialEq for JostleTree<N, T>
[src]

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

This method tests for !=.

Auto Trait Implementations

impl<N, T> !Send for JostleTree<N, T>

impl<N, T> !Sync for JostleTree<N, T>