mz_persist_client::iter

Trait RowSort

Source
pub(crate) trait RowSort<T, D> {
    type Updates: Debug;
    type KV<'a>: Ord + Copy + Debug;

    // Required methods
    fn desired_sort(data: &FetchData<T>) -> bool;
    fn kv_lower(part: &FetchData<T>) -> Option<Self::KV<'_>>;
    fn updates_from_blob(&self, updates: BlobTraceUpdates) -> Self::Updates;
    fn len(updates: &Self::Updates) -> usize;
    fn kv_size(kv: Self::KV<'_>) -> usize;
    fn get(
        updates: &Self::Updates,
        index: usize,
    ) -> Option<(Self::KV<'_>, T, D)>;
    fn interleave_updates<'a>(
        updates: &[&'a Self::Updates],
        elements: impl IntoIterator<Item = ((usize, usize), Self::KV<'a>, T, D)>,
    ) -> Self::Updates;
    fn updates_to_blob(&self, updates: Self::Updates) -> BlobTraceUpdates;
}

Required Associated Types§

Required Methods§

Source

fn desired_sort(data: &FetchData<T>) -> bool

Source

fn kv_lower(part: &FetchData<T>) -> Option<Self::KV<'_>>

Source

fn updates_from_blob(&self, updates: BlobTraceUpdates) -> Self::Updates

Source

fn len(updates: &Self::Updates) -> usize

Source

fn kv_size(kv: Self::KV<'_>) -> usize

Source

fn get(updates: &Self::Updates, index: usize) -> Option<(Self::KV<'_>, T, D)>

Source

fn interleave_updates<'a>( updates: &[&'a Self::Updates], elements: impl IntoIterator<Item = ((usize, usize), Self::KV<'a>, T, D)>, ) -> Self::Updates

Source

fn updates_to_blob(&self, updates: Self::Updates) -> BlobTraceUpdates

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<K: Codec, V: Codec, T: Codec64, D: Codec64> RowSort<T, D> for CodecSort<K, V, T, D>

Source§

type Updates = (ColumnarRecords, BlobTraceUpdates)

Source§

type KV<'a> = (&'a [u8], &'a [u8])

Source§

impl<K: Codec, V: Codec, T: Codec64, D: Codec64> RowSort<T, D> for StructuredSort<K, V, T, D>