Trait ColumnCursor

Source
pub trait ColumnCursor:
    Debug
    + Clone
    + Copy
    + PartialEq
    + Default {
    type Item: Packable + ?Sized;
    type State<'a>: EncoderState<'a, Self::Item>
       where <Self as ColumnCursor>::Item: 'a;
    type PostState<'a>: Debug
       where Self::Item: 'a;
    type Export: Debug + PartialEq + Clone;
    type SlabIndex: Debug + Clone + HasPos + HasAcc + SpanWeight<Slab>;

Show 31 methods // Required methods fn empty() -> Self; fn finalize_state<'a>( slab: &'a Slab, encoder: &mut Encoder<'a, Self>, post: Self::PostState<'a>, cursor: Self, ) -> Option<Self>; fn finish<'a>( slab: &'a Slab, writer: &mut SlabWriter<'a, Self::Item>, cursor: Self, ); fn copy_between<'a>( slab: &'a [u8], writer: &mut SlabWriter<'a, Self::Item>, c0: Self, c1: Self, run: Run<'a, Self::Item>, size: usize, ) -> Self::State<'a>; fn splice_encoder( index: usize, del: usize, slab: &Slab, ) -> SpliceEncoder<'_, Self>; fn slab_size() -> usize; fn try_next<'a>( &mut self, data: &'a [u8], ) -> Result<Option<Run<'a, Self::Item>>, PackError>; fn export_splice<'a, I>( data: &mut Vec<Self::Export>, range: Range<usize>, values: I, ) where I: Iterator<Item = Option<Cow<'a, Self::Item>>>, Self::Item: 'a; fn index(&self) -> usize; fn offset(&self) -> usize; fn load_with( data: &[u8], m: &ScanMeta, ) -> Result<ColumnData<Self>, PackError>; // Provided methods fn encode<'a, I>(out: &mut Vec<u8>, values: I, force: bool) -> Range<usize> where I: Iterator<Item = Option<Cow<'a, Self::Item>>>, Self::Item: 'a { ... } fn new(_: &Slab) -> Self { ... } fn iter(slab: &[u8]) -> CursorIter<'_, Self> { ... } fn compute_min_max(_slabs: &mut [Slab]) { ... } fn is_empty(v: Option<Cow<'_, Self::Item>>) -> bool { ... } fn contains_range( &self, run: &Run<'_, Self::Item>, range: &Range<usize>, ) -> Option<Range<usize>> { ... } fn contains( &self, run: &Run<'_, Self::Item>, target: Agg, ) -> Option<Range<usize>> { ... } fn contains_agg( &self, run: &Run<'_, Self::Item>, agg: Agg, ) -> Option<Range<usize>> { ... } fn pop<'a>( &self, run: &mut Run<'a, Self::Item>, ) -> Option<Option<Cow<'a, Self::Item>>> { ... } fn pop_n<'a>( &self, run: &mut Run<'a, Self::Item>, n: usize, ) -> Option<Option<Cow<'a, Self::Item>>> { ... } fn next<'a>(&mut self, data: &'a [u8]) -> Option<Run<'a, Self::Item>> { ... } fn acc(&self) -> Acc { ... } fn min(&self) -> Agg { ... } fn max(&self) -> Agg { ... } fn seek(index: usize, slab: &Slab) -> (Option<Run<'_, Self::Item>>, Self) { ... } fn debug_scan(data: &[u8], m: &ScanMeta) -> Result<Self, PackError> { ... } fn load(data: &[u8]) -> Result<ColumnData<Self>, PackError> { ... } fn splice<'a, 'b, I, M>( slab: &'a Slab, index: usize, del: usize, values: I, debug: (&mut Vec<Self::Export>, Range<usize>), ) -> SpliceResult where M: MaybePackable<'b, Self::Item>, I: Iterator<Item = M>, Self::Item: 'b { ... } fn splice_delete<'a>( _post: Option<Run<'a, Self::Item>>, _cursor: Self, _del: usize, slab: &'a Slab, ) -> SpliceDel<'a, Self> { ... } fn init_empty(len: usize) -> Slab { ... }
}

Required Associated Types§

Source

type Item: Packable + ?Sized

Source

type State<'a>: EncoderState<'a, Self::Item> where <Self as ColumnCursor>::Item: 'a

Source

type PostState<'a>: Debug where Self::Item: 'a

Source

type Export: Debug + PartialEq + Clone

Source

type SlabIndex: Debug + Clone + HasPos + HasAcc + SpanWeight<Slab>

Required Methods§

Source

fn empty() -> Self

Source

fn finalize_state<'a>( slab: &'a Slab, encoder: &mut Encoder<'a, Self>, post: Self::PostState<'a>, cursor: Self, ) -> Option<Self>

Source

fn finish<'a>( slab: &'a Slab, writer: &mut SlabWriter<'a, Self::Item>, cursor: Self, )

Source

fn copy_between<'a>( slab: &'a [u8], writer: &mut SlabWriter<'a, Self::Item>, c0: Self, c1: Self, run: Run<'a, Self::Item>, size: usize, ) -> Self::State<'a>

Source

fn splice_encoder( index: usize, del: usize, slab: &Slab, ) -> SpliceEncoder<'_, Self>

Source

fn slab_size() -> usize

Source

fn try_next<'a>( &mut self, data: &'a [u8], ) -> Result<Option<Run<'a, Self::Item>>, PackError>

Source

fn export_splice<'a, I>( data: &mut Vec<Self::Export>, range: Range<usize>, values: I, )
where I: Iterator<Item = Option<Cow<'a, Self::Item>>>, Self::Item: 'a,

Source

fn index(&self) -> usize

Source

fn offset(&self) -> usize

Source

fn load_with(data: &[u8], m: &ScanMeta) -> Result<ColumnData<Self>, PackError>

Provided Methods§

Source

fn encode<'a, I>(out: &mut Vec<u8>, values: I, force: bool) -> Range<usize>
where I: Iterator<Item = Option<Cow<'a, Self::Item>>>, Self::Item: 'a,

Source

fn new(_: &Slab) -> Self

Source

fn iter(slab: &[u8]) -> CursorIter<'_, Self>

Source

fn compute_min_max(_slabs: &mut [Slab])

Source

fn is_empty(v: Option<Cow<'_, Self::Item>>) -> bool

Source

fn contains_range( &self, run: &Run<'_, Self::Item>, range: &Range<usize>, ) -> Option<Range<usize>>

Source

fn contains( &self, run: &Run<'_, Self::Item>, target: Agg, ) -> Option<Range<usize>>

Source

fn contains_agg( &self, run: &Run<'_, Self::Item>, agg: Agg, ) -> Option<Range<usize>>

Source

fn pop<'a>( &self, run: &mut Run<'a, Self::Item>, ) -> Option<Option<Cow<'a, Self::Item>>>

Source

fn pop_n<'a>( &self, run: &mut Run<'a, Self::Item>, n: usize, ) -> Option<Option<Cow<'a, Self::Item>>>

Source

fn next<'a>(&mut self, data: &'a [u8]) -> Option<Run<'a, Self::Item>>

Source

fn acc(&self) -> Acc

Source

fn min(&self) -> Agg

Source

fn max(&self) -> Agg

Source

fn seek(index: usize, slab: &Slab) -> (Option<Run<'_, Self::Item>>, Self)

Source

fn debug_scan(data: &[u8], m: &ScanMeta) -> Result<Self, PackError>

Source

fn load(data: &[u8]) -> Result<ColumnData<Self>, PackError>

Source

fn splice<'a, 'b, I, M>( slab: &'a Slab, index: usize, del: usize, values: I, debug: (&mut Vec<Self::Export>, Range<usize>), ) -> SpliceResult
where M: MaybePackable<'b, Self::Item>, I: Iterator<Item = M>, Self::Item: 'b,

Source

fn splice_delete<'a>( _post: Option<Run<'a, Self::Item>>, _cursor: Self, _del: usize, slab: &'a Slab, ) -> SpliceDel<'a, Self>

Source

fn init_empty(len: usize) -> Slab

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const B: usize, P: Packable + ?Sized, X: HasPos + HasAcc + SpanWeight<Slab>> ColumnCursor for RleCursor<B, P, X>

Source§

type Item = P

Source§

type State<'a> = RleState<'a, P> where P: 'a

Source§

type PostState<'a> = Option<Run<'a, <RleCursor<B, P, X> as ColumnCursor>::Item>> where Self::Item: 'a

Source§

type Export = Option<<P as ToOwned>::Owned>

Source§

type SlabIndex = X