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

pub struct JostleTree<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<T> JostleTree<T>
[src]

[src]

[src]

[src]

[src]

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

[src]

inserts at or before whatever is at_offset.

[src]

inserts at the back

[src]

inserts at the front

[src]

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.

[src]

[src]

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

[src]

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

[src]

Iterates over the buckets

Trait Implementations

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

[src]

Formats the value using the given formatter.

impl<T: Display> Display for JostleTree<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: Hash> Hash for JostleTree<T>
[src]

[src]

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

1.3.0
[src]

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

impl<T: PartialEq> PartialEq for JostleTree<T>
[src]

[src]

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

[src]

This method tests for !=.