Struct ColumnData

Source
pub struct ColumnData<C: ColumnCursor> {
    pub len: usize,
    pub slabs: SpanTree<Slab, C::SlabIndex>,
    pub debug: Vec<C::Export>,
    /* private fields */
}

Fields§

§len: usize§slabs: SpanTree<Slab, C::SlabIndex>§debug: Vec<C::Export>

Implementations§

Source§

impl<C: ColumnCursor> ColumnData<C>

Source

pub fn byte_len(&self) -> usize

Source

pub fn get(&self, index: usize) -> Option<Option<Cow<'_, C::Item>>>

Source

pub fn get_with_acc( &self, index: usize, ) -> Option<ColGroupItem<'_, <C as ColumnCursor>::Item>>

Source

pub fn get_acc(&self, index: usize) -> Acc

Source

pub fn is_empty(&self) -> bool

Source

pub fn dump(&self)

Source

pub fn and_remap<F>(self, f: F) -> Self
where F: Fn(Option<Cow<'_, C::Item>>) -> Option<Cow<'_, C::Item>>,

Source

pub fn remap<F>(&mut self, f: F)
where F: Fn(Option<Cow<'_, C::Item>>) -> Option<Cow<'_, C::Item>>,

Source

pub fn save_to_unless_empty(&self, out: &mut Vec<u8>) -> Range<usize>

Source

pub fn save_to(&self, out: &mut Vec<u8>) -> Range<usize>

Source

pub fn raw_reader(&self, advance: usize) -> RawReader<'_, C::SlabIndex>

Source§

impl<C: ColumnCursor> ColumnData<C>

Source

pub fn run_iter(&self) -> impl Iterator<Item = Run<'_, C::Item>>

Source

pub fn to_vec(&self) -> Vec<C::Export>

Source

pub fn iter(&self) -> ColumnDataIter<'_, C>

Source

pub fn scope_to_value<B, R>(&self, value: Option<B>, range: R) -> Range<usize>
where B: Borrow<C::Item> + Copy + Debug, R: RangeBounds<usize>, C::Item: Ord,

Source

pub fn iter_range(&self, range: Range<usize>) -> ColumnDataIter<'_, C>

Source

pub fn new() -> Self

Source

pub fn save(&self) -> Vec<u8>

Source

pub fn push<'b, M>(&mut self, value: M) -> Acc
where M: MaybePackable<'b, C::Item> + Clone, C::Item: 'b,

Source

pub fn splice<'b, M, I>(&mut self, index: usize, del: usize, values: I) -> Acc
where M: MaybePackable<'b, C::Item>, I: IntoIterator<Item = M>, C::Item: 'b,

Source

pub fn fill_if_empty(&mut self, len: usize) -> bool

Source

pub fn init_empty(len: usize) -> Self

Source

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

Source

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

Source

pub fn len(&self) -> usize

Source

pub fn acc(&self) -> Acc

Source§

impl<C: ColumnCursor> ColumnData<C>
where C::SlabIndex: HasMinMax,

Source

pub fn find_by_range( &self, range: Range<usize>, ) -> impl Iterator<Item = usize> + '_

Source

pub fn find_by_value<A: Into<Agg>>( &self, agg: A, ) -> impl Iterator<Item = usize> + '_

Trait Implementations§

Source§

impl<C: Clone + ColumnCursor> Clone for ColumnData<C>
where C::SlabIndex: Clone, C::Export: Clone,

Source§

fn clone(&self) -> ColumnData<C>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Debug + ColumnCursor> Debug for ColumnData<C>
where C::SlabIndex: Debug, C::Export: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C: ColumnCursor> Default for ColumnData<C>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a, C, M> FromIterator<M> for ColumnData<C>
where C: ColumnCursor, M: MaybePackable<'a, C::Item>, C::Item: 'a,

Source§

fn from_iter<I: IntoIterator<Item = M>>(iter: I) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.