Skip to main content

VecReduceBackend

Struct VecReduceBackend 

Source
pub struct VecReduceBackend<K, V, W, T, R, L> { /* private fields */ }
Expand description

A reference ProxyReduceBackend over VBatch storage.

Implementations§

Source§

impl<K, V, W, T, R, L> VecReduceBackend<K, V, W, T, R, L>

Source

pub fn new(logic: L) -> Self

A backend deferring value semantics to logic, covering the key space in windows.

Source

pub fn with_window(logic: L, window_size: usize) -> Self

A backend with an explicit window budget, in presented records.

Trait Implementations§

Source§

impl<K, V, W, T, R, L> ProxyReduceBackend<T, Rc<ChunkBatch<VecChunk<u64, (K, V), T, R>>>, Rc<ChunkBatch<VecChunk<u64, (K, W), T, R>>>> for VecReduceBackend<K, V, W, T, R, L>
where K: Ord + Clone + Hash + 'static, V: Ord + Clone + 'static, W: Ord + Clone + Hash + 'static, T: Lattice + Timestamp, R: Semigroup + Ord + Clone + 'static, L: FnMut(&K, &[(V, R)], &mut Vec<(W, R)>, &mut Vec<(W, R)>),

Source§

type Key = u64

Independent groups, with identities stable across retires.
Source§

type VIn = u64

Input value proxies, valid throughout a window.
Source§

type VOut = u64

Output value proxies, including newly produced values, valid throughout a window.
Source§

type RIn = R

Diff type presented for the input.
Source§

type ROut = R

Diff type of the output.
Source§

fn begin(&mut self, _description: Description<T>)

Initiate a session to create batches for these descriptions, which span [lower, upper). Read more
Source§

fn next_window( &mut self, instance: &ReduceInstance<'_, T, Rc<ChunkBatch<VecChunk<u64, (K, V), T, R>>>, Rc<ChunkBatch<VecChunk<u64, (K, W), T, R>>>>, changed: &[u64], from: &mut KeyPosition<u64>, window: &mut ReduceWindow<T, R, R>, )

Present the next window of the key space, and advance from past it. Read more
Source§

fn reduce_corrections( &mut self, keys: &[u64], in_ends: &[usize], input: &[(u64, R)], out_ends: &[usize], output: &[(u64, R)], ) -> (Vec<(u64, R)>, Vec<usize>)

A wave of input-output reconciliation, in which the backend supplies necessary edits. Read more
Source§

fn emit(&mut self, records: &[((u64, u64), T, R)])

Commit a collection of updates to the batch in progress.
Source§

fn finish(&mut self) -> Option<Rc<ChunkBatch<VecChunk<u64, (K, W), T, R>>>>

Complete the session matching begin, yielding the batch it described, or None when the span it described carries no updates.

Auto Trait Implementations§

§

impl<K, V, W, T, R, L> !Send for VecReduceBackend<K, V, W, T, R, L>

§

impl<K, V, W, T, R, L> !Sync for VecReduceBackend<K, V, W, T, R, L>

§

impl<K, V, W, T, R, L> Freeze for VecReduceBackend<K, V, W, T, R, L>

§

impl<K, V, W, T, R, L> RefUnwindSafe for VecReduceBackend<K, V, W, T, R, L>

§

impl<K, V, W, T, R, L> Unpin for VecReduceBackend<K, V, W, T, R, L>
where L: Unpin, Vec<(K, V)>: Unpin, Vec<(K, W)>: Unpin, HashMap<(K, W), u64>: Unpin, Vec<VecChunk<u64, (K, W), T, R>>: Unpin, Vec<((u64, (K, W)), T, R)>: Unpin,

§

impl<K, V, W, T, R, L> UnsafeUnpin for VecReduceBackend<K, V, W, T, R, L>

§

impl<K, V, W, T, R, L> UnwindSafe for VecReduceBackend<K, V, W, T, R, L>

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.