Trait mz_persist_client::iter::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

Object Safety§

This trait is not object safe.

Implementors§

source§

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

source§

impl<T: Codec64, D: Codec64> RowSort<T, D> for CodecSort<T, D>

§

type Updates = BlobTraceUpdates

§

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