pub struct StepChain { /* private fields */ }Expand description
Ordered chain of TransformSteps applied sequentially to each record.
If any step returns Ok(false), the record is dropped from the output.
If any step returns Err, the entire chain short-circuits.
Implementations§
Source§impl StepChain
impl StepChain
pub fn new(steps: Vec<Box<dyn TransformStep>>) -> Self
pub fn apply_one(&self, data: &mut Value) -> Result<bool, OversyncError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn filter_rows(
&self,
rows: Vec<RawRow>,
) -> Result<Vec<RawRow>, OversyncError>
pub fn filter_rows( &self, rows: Vec<RawRow>, ) -> Result<Vec<RawRow>, OversyncError>
Filter rows pre-delta: applies steps to each RawRow.row_data, keeping only rows where all steps return true.
Trait Implementations§
Source§impl TransformHook for StepChain
impl TransformHook for StepChain
fn transform<'life0, 'async_trait>(
&'life0 self,
envelopes: Vec<EventEnvelope>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventEnvelope>, OversyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for StepChain
impl !RefUnwindSafe for StepChain
impl Send for StepChain
impl Sync for StepChain
impl Unpin for StepChain
impl UnsafeUnpin for StepChain
impl !UnwindSafe for StepChain
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