pub struct MapOperator<F>{
pub name: String,
pub func: Arc<F>,
}Expand description
Map operator - transforms each item
Fields§
§name: String§func: Arc<F>Implementations§
Trait Implementations§
Source§impl<F> StreamOperator for MapOperator<F>
impl<F> StreamOperator for MapOperator<F>
Source§impl<F> StreamProcessor for MapOperator<F>
impl<F> StreamProcessor for MapOperator<F>
Source§fn process_item<'life0, 'life1, 'async_trait>(
&'life0 self,
item: Value,
_ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = RuleResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_item<'life0, 'life1, 'async_trait>(
&'life0 self,
item: Value,
_ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = RuleResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process a single item from the stream
Source§fn process_chunk<'life0, 'life1, 'async_trait>(
&'life0 self,
items: Vec<Value>,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, RuleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_chunk<'life0, 'life1, 'async_trait>(
&'life0 self,
items: Vec<Value>,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, RuleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process a chunk of items (for batch operations)
Auto Trait Implementations§
impl<F> Freeze for MapOperator<F>
impl<F> RefUnwindSafe for MapOperator<F>where
F: RefUnwindSafe,
impl<F> Send for MapOperator<F>
impl<F> Sync for MapOperator<F>
impl<F> Unpin for MapOperator<F>
impl<F> UnwindSafe for MapOperator<F>where
F: RefUnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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