pub struct AggregateAdapter<F> { /* private fields */ }Expand description
Type-erased adapter that wraps a concrete AggregateFunction so the
registry can store heterogeneous aggregates behind a single trait object.
The adapter implements AggregateFunction<State = Box<dyn Any + Send>>,
boxing the concrete state on creation and downcasting on step/finalize.
Implementations§
Source§impl<F> AggregateAdapter<F>
impl<F> AggregateAdapter<F>
Trait Implementations§
Source§impl<F> AggregateFunction for AggregateAdapter<F>where
F: AggregateFunction,
F::State: 'static,
impl<F> AggregateFunction for AggregateAdapter<F>where
F: AggregateFunction,
F::State: 'static,
Source§fn initial_state(&self) -> Self::State
fn initial_state(&self) -> Self::State
Create a fresh accumulator (zero/identity state).
Source§fn step(&self, state: &mut Self::State, args: &[SqliteValue]) -> Result<()>
fn step(&self, state: &mut Self::State, args: &[SqliteValue]) -> Result<()>
Process one row, updating the accumulator.
Auto Trait Implementations§
impl<F> Freeze for AggregateAdapter<F>where
F: Freeze,
impl<F> RefUnwindSafe for AggregateAdapter<F>where
F: RefUnwindSafe,
impl<F> Send for AggregateAdapter<F>where
F: Send,
impl<F> Sync for AggregateAdapter<F>where
F: Sync,
impl<F> Unpin for AggregateAdapter<F>where
F: Unpin,
impl<F> UnsafeUnpin for AggregateAdapter<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for AggregateAdapter<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more