Skip to main content

Transform

Trait Transform 

Source
pub trait Transform<Input> {
    type Output;
    type Error;

    // Required method
    fn transform(
        &mut self,
        input: Input,
        context: &TaskContext,
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

A fallible sample transformation with task-local deterministic context.

Required Associated Types§

Source

type Output

Output passed to collation.

Source

type Error

Transformation failure.

Required Methods§

Source

fn transform( &mut self, input: Input, context: &TaskContext, ) -> Result<Self::Output, Self::Error>

Transforms one logical sample occurrence.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Input, Output, E, F> Transform<Input> for FnTransform<F>
where F: FnMut(Input, &TaskContext) -> Result<Output, E>,

Source§

type Output = Output

Source§

type Error = E

Source§

impl<Input, T> Transform<Input> for StatelessWorker<T>
where T: Transform<Input>,

Source§

type Output = <T as Transform<Input>>::Output

Source§

type Error = <T as Transform<Input>>::Error

Source§

impl<Input, T> Transform<Input> for TransactionalWorker<T>

Source§

type Output = <T as Transform<Input>>::Output

Source§

type Error = <T as Transform<Input>>::Error

Source§

impl<Input> Transform<Input> for IdentityTransform

Source§

type Output = Input

Source§

type Error = !