FlatMap

Struct FlatMap 

Source
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>
where IN: ArconType, OUTS: IntoIterator + 'static, OUTS::Item: ArconType,

Source

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,

Source

pub fn stateful(udf: F) -> Self

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,

Source§

type IN = IN

The type of input elements this operator processes
Source§

type OUT = <OUTS as IntoIterator>::Item

The type of output elements this operator produces
Source§

type TimerState = ArconNever

Storage state type for timer facilities
Source§

type OperatorState = S

State type for the Operator
Source§

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>

Determines how the Operator processes Elements
Source§

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 triggered
Source§

fn on_start( &mut self, _ctx: &mut OperatorContext<Self::TimerState, Self::OperatorState>, ) -> ArconResult<()>

Determines what the Operator runs before beginning to process Elements

Auto Trait Implementations§

§

impl<IN, OUTS, F, S> Freeze for FlatMap<IN, OUTS, F, S>
where <OUTS as IntoIterator>::Item: Sized, F: Freeze,

§

impl<IN, OUTS, F, S> RefUnwindSafe for FlatMap<IN, OUTS, F, S>
where <OUTS as IntoIterator>::Item: Sized, F: RefUnwindSafe,

§

impl<IN, OUTS, F, S> Send for FlatMap<IN, OUTS, F, S>
where <OUTS as IntoIterator>::Item: Sized,

§

impl<IN, OUTS, F, S> Sync for FlatMap<IN, OUTS, F, S>
where <OUTS as IntoIterator>::Item: Sized,

§

impl<IN, OUTS, F, S> Unpin for FlatMap<IN, OUTS, F, S>
where <OUTS as IntoIterator>::Item: Sized, F: Unpin,

§

impl<IN, OUTS, F, S> UnwindSafe for FlatMap<IN, OUTS, F, S>
where <OUTS as IntoIterator>::Item: Sized, F: 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Erased for T

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,