pub struct FlatMap<IN, OUTS, F, S>where
IN: ArconType,
OUTS: IntoIterator,
OUTS::Item: ArconType,
F: Fn(IN, &mut S) -> ArconResult<OUTS> + ArconFnBounds,
S: ArconState,{ /* private fields */ }Implementations§
Source§impl<IN, OUTS> FlatMap<IN, OUTS, fn(IN, &mut EmptyState) -> ArconResult<OUTS>, EmptyState>
impl<IN, OUTS> FlatMap<IN, OUTS, fn(IN, &mut EmptyState) -> ArconResult<OUTS>, EmptyState>
pub fn new( udf: impl Fn(IN) -> OUTS + ArconFnBounds, ) -> FlatMap<IN, OUTS, impl Fn(IN, &mut EmptyState) -> ArconResult<OUTS> + ArconFnBounds, EmptyState>
Source§impl<IN, OUTS, F, S> FlatMap<IN, OUTS, F, S>where
IN: ArconType,
OUTS: IntoIterator + 'static,
OUTS::Item: ArconType,
F: Fn(IN, &mut S) -> ArconResult<OUTS> + ArconFnBounds,
S: ArconState,
impl<IN, OUTS, F, S> FlatMap<IN, OUTS, F, S>where
IN: ArconType,
OUTS: IntoIterator + 'static,
OUTS::Item: ArconType,
F: Fn(IN, &mut S) -> ArconResult<OUTS> + ArconFnBounds,
S: ArconState,
Trait Implementations§
Source§impl<IN, OUTS, F, S> Operator for FlatMap<IN, OUTS, F, S>where
IN: ArconType,
OUTS: IntoIterator + 'static,
OUTS::Item: ArconType,
F: Fn(IN, &mut S) -> ArconResult<OUTS> + ArconFnBounds,
S: ArconState,
impl<IN, OUTS, F, S> Operator for FlatMap<IN, OUTS, F, S>where
IN: ArconType,
OUTS: IntoIterator + 'static,
OUTS::Item: ArconType,
F: Fn(IN, &mut S) -> ArconResult<OUTS> + ArconFnBounds,
S: ArconState,
Source§type OUT = <OUTS as IntoIterator>::Item
type OUT = <OUTS as IntoIterator>::Item
The type of output elements this operator produces
Source§type TimerState = ArconNever
type TimerState = ArconNever
Storage state type for timer facilities
Source§type OperatorState = S
type OperatorState = S
State type for the Operator
Source§type ElementIterator = Box<dyn Iterator<Item = ArconElement<<FlatMap<IN, OUTS, F, S> as Operator>::OUT>>>
type ElementIterator = Box<dyn Iterator<Item = ArconElement<<FlatMap<IN, OUTS, F, S> as Operator>::OUT>>>
Iterator that produces outgoing elements
Source§fn handle_element(
&mut self,
element: ArconElement<IN>,
ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>,
) -> ArconResult<Self::ElementIterator>
fn handle_element( &mut self, element: ArconElement<IN>, ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>, ) -> ArconResult<Self::ElementIterator>
Determines how the
Operator processes ElementsSource§fn handle_timeout(
&mut self,
_timeout: Self::TimerState,
_ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>,
) -> ArconResult<Option<Self::ElementIterator>>
fn handle_timeout( &mut self, _timeout: Self::TimerState, _ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>, ) -> ArconResult<Option<Self::ElementIterator>>
Determines how the
Operator handles timeouts it registered earlier when they are triggeredSource§fn on_start(
&mut self,
_ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>,
) -> ArconResult<()>
fn on_start( &mut self, _ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>, ) -> ArconResult<()>
Determines what the
Operator runs before beginning to process ElementsAuto Trait Implementations§
impl<IN, OUTS, F, S> Freeze for FlatMap<IN, OUTS, F, S>
impl<IN, OUTS, F, S> RefUnwindSafe for FlatMap<IN, OUTS, F, S>
impl<IN, OUTS, F, S> Send for FlatMap<IN, OUTS, F, S>
impl<IN, OUTS, F, S> Sync for FlatMap<IN, OUTS, F, S>
impl<IN, OUTS, F, S> Unpin for FlatMap<IN, OUTS, F, S>
impl<IN, OUTS, F, S> UnwindSafe for FlatMap<IN, OUTS, F, S>
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