pub struct Map<F> { /* private fields */ }Expand description
Map operator: applies a user function that returns zero or more outputs per input. Map operator: applies a user function that returns zero or more outputs per input.
Example
use pulse_ops::{Map, MapFn};
let map = Map::new(MapFn::new(|v: serde_json::Value| vec![v]));Implementations§
Trait Implementations§
Source§impl<F> Operator for Map<F>
impl<F> Operator for Map<F>
fn on_element<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut dyn Context,
rec: Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_watermark<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut dyn Context,
_wm: Watermark,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn on_timer<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut dyn Context,
_when: EventTime,
_key: Option<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl<F> Freeze for Map<F>where
F: Freeze,
impl<F> RefUnwindSafe for Map<F>where
F: RefUnwindSafe,
impl<F> Send for Map<F>where
F: Send,
impl<F> Sync for Map<F>where
F: Sync,
impl<F> Unpin for Map<F>where
F: Unpin,
impl<F> UnwindSafe for Map<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