Skip to main content

TransformBuilder

Struct TransformBuilder 

Source
pub struct TransformBuilder<I, O, R: Spawn + 'static> { /* private fields */ }
Expand description

Configures a single-input transform pipeline.

Created by RecordRegistrar::transform_raw(). Use .map() for stateless transforms or .with_state() for stateful transforms.

Implementations§

Source§

impl<I, O, R> TransformBuilder<I, O, R>
where I: Send + Sync + Clone + Debug + 'static, O: Send + Sync + Clone + Debug + 'static, R: Spawn + 'static,

Source

pub fn map<F>(self, f: F) -> TransformPipeline<I, O, R>
where F: Fn(&I) -> Option<O> + Send + Sync + 'static,

Stateless 1:1 map. Returning None skips output for this input value.

Source

pub fn with_state<S: Send + Sync + 'static>( self, initial: S, ) -> StatefulTransformBuilder<I, O, S, R>

Begin configuring a stateful transform. S is the user-defined state type.

Auto Trait Implementations§

§

impl<I, O, R> Freeze for TransformBuilder<I, O, R>

§

impl<I, O, R> RefUnwindSafe for TransformBuilder<I, O, R>

§

impl<I, O, R> Send for TransformBuilder<I, O, R>
where I: Send, O: Send,

§

impl<I, O, R> Sync for TransformBuilder<I, O, R>
where I: Sync, O: Sync,

§

impl<I, O, R> Unpin for TransformBuilder<I, O, R>
where I: Unpin, O: Unpin, R: Unpin,

§

impl<I, O, R> UnsafeUnpin for TransformBuilder<I, O, R>

§

impl<I, O, R> UnwindSafe for TransformBuilder<I, O, R>
where I: UnwindSafe, O: UnwindSafe, R: UnwindSafe,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.