pub struct OrderedBuilder<K, L, O = usize, C = Vec<K>>where
    K: Ord,
    C: BatchContainer<Item = K>,
    O: OrdOffset,{
    pub keys: C,
    pub offs: Vec<O>,
    pub vals: L,
}
Expand description

Assembles a layer of this

Fields§

§keys: C

Keys

§offs: Vec<O>

Offsets

§vals: L

The next layer down

Implementations§

source§

impl<K, L, O, C> OrderedBuilder<K, L, O, C>where K: Ord + Clone, C: BatchContainer<Item = K>, L: MergeBuilder, O: OrdOffset,

source

pub fn merge_step( &mut self, other1: (&<Self as Builder>::Trie, &mut usize, usize), other2: (&<Self as Builder>::Trie, &mut usize, usize) )

Performs one step of merging.

Trait Implementations§

source§

impl<K, L, O, C> Builder for OrderedBuilder<K, L, O, C>where K: Ord + Clone, C: BatchContainer<Item = K>, L: Builder, O: OrdOffset,

§

type Trie = OrderedLayer<K, <L as Builder>::Trie, O, C>

The type of collection produced.
source§

fn boundary(&mut self) -> usize

Requests a commitment to the offset of the current-most sub-collection. Read more
source§

fn done(self) -> Self::Trie

Finalizes the building process and returns the collection.
source§

impl<K, L, O, C> MergeBuilder for OrderedBuilder<K, L, O, C>where K: Ord + Clone, C: BatchContainer<Item = K>, L: MergeBuilder, O: OrdOffset,

source§

fn with_capacity(other1: &Self::Trie, other2: &Self::Trie) -> Self

Allocates an instance of the builder with sufficient capacity to contain the merged data.
source§

fn copy_range(&mut self, other: &Self::Trie, lower: usize, upper: usize)

Copies sub-collections of other into this collection.
source§

fn push_merge( &mut self, other1: (&Self::Trie, usize, usize), other2: (&Self::Trie, usize, usize) ) -> usize

Merges two sub-collections into one sub-collection.
source§

impl<K, L, O, C> TupleBuilder for OrderedBuilder<K, L, O, C>where K: Ord + Clone, C: BatchContainer<Item = K>, L: TupleBuilder, O: OrdOffset,

§

type Item = (K, <L as TupleBuilder>::Item)

The type of item accepted for construction.
source§

fn new() -> Self

Allocates a new builder.
source§

fn with_capacity(cap: usize) -> Self

Allocates a new builder with capacity for at least cap tuples.
source§

fn push_tuple(&mut self, (key, val): (K, L::Item))

Inserts a new into the collection.

Auto Trait Implementations§

§

impl<K, L, O, C> RefUnwindSafe for OrderedBuilder<K, L, O, C>where C: RefUnwindSafe, L: RefUnwindSafe, O: RefUnwindSafe,

§

impl<K, L, O, C> Send for OrderedBuilder<K, L, O, C>where C: Send, L: Send, O: Send,

§

impl<K, L, O, C> Sync for OrderedBuilder<K, L, O, C>where C: Sync, L: Sync, O: Sync,

§

impl<K, L, O, C> Unpin for OrderedBuilder<K, L, O, C>where C: Unpin, L: Unpin, O: Unpin,

§

impl<K, L, O, C> UnwindSafe for OrderedBuilder<K, L, O, C>where C: UnwindSafe, L: UnwindSafe, O: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.