Struct timely::dataflow::stream::StreamCore
source · pub struct StreamCore<S: Scope, D> { /* private fields */ }
Expand description
Abstraction of a stream of D: Container
records timestamped with S::Timestamp
.
Internally Stream
maintains a list of data recipients who should be presented with data
produced by the source of the stream.
Implementations§
source§impl<S: Scope, D: Container> StreamCore<S, D>
impl<S: Scope, D: Container> StreamCore<S, D>
sourcepub fn connect_to<P: Push<BundleCore<S::Timestamp, D>> + 'static>(
&self,
target: Target,
pusher: P,
identifier: usize
)
pub fn connect_to<P: Push<BundleCore<S::Timestamp, D>> + 'static>( &self, target: Target, pusher: P, identifier: usize )
Connects the stream to a destination.
The destination is described both by a Target
, for progress tracking information, and a P: Push
where the
records should actually be sent. The identifier is unique to the edge and is used only for logging purposes.
Trait Implementations§
source§impl<S: Scope, C: Container> BranchWhen<<S as ScopeParent>::Timestamp> for StreamCore<S, C>
impl<S: Scope, C: Container> BranchWhen<<S as ScopeParent>::Timestamp> for StreamCore<S, C>
source§fn branch_when(
&self,
condition: impl Fn(&S::Timestamp) -> bool + 'static
) -> (Self, Self)
fn branch_when( &self, condition: impl Fn(&S::Timestamp) -> bool + 'static ) -> (Self, Self)
Takes one input stream and splits it into two output streams.
For each time, the supplied closure is called. If it returns true,
the records for that will be sent to the second returned stream, otherwise
they will be sent to the first. Read more
source§impl<S: Scope, D: Container> Capture<<S as ScopeParent>::Timestamp, D> for StreamCore<S, D>
impl<S: Scope, D: Container> Capture<<S as ScopeParent>::Timestamp, D> for StreamCore<S, D>
source§impl<S: Clone + Scope, D: Clone> Clone for StreamCore<S, D>where
S::Timestamp: Clone,
impl<S: Clone + Scope, D: Clone> Clone for StreamCore<S, D>where S::Timestamp: Clone,
source§fn clone(&self) -> StreamCore<S, D>
fn clone(&self) -> StreamCore<S, D>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<G: Scope, D: Container> Concat<G, D> for StreamCore<G, D>
impl<G: Scope, D: Container> Concat<G, D> for StreamCore<G, D>
source§fn concat(&self, other: &StreamCore<G, D>) -> StreamCore<G, D>
fn concat(&self, other: &StreamCore<G, D>) -> StreamCore<G, D>
Merge the contents of two streams. Read more
source§impl<G: Scope, D: Container> Concatenate<G, D> for StreamCore<G, D>
impl<G: Scope, D: Container> Concatenate<G, D> for StreamCore<G, D>
source§fn concatenate<I>(&self, sources: I) -> StreamCore<G, D>where
I: IntoIterator<Item = StreamCore<G, D>>,
fn concatenate<I>(&self, sources: I) -> StreamCore<G, D>where I: IntoIterator<Item = StreamCore<G, D>>,
Merge the contents of multiple streams. Read more
source§impl<G: Scope, D: Container> ConnectLoop<G, D> for StreamCore<G, D>
impl<G: Scope, D: Container> ConnectLoop<G, D> for StreamCore<G, D>
source§fn connect_loop(&self, helper: HandleCore<G, D>)
fn connect_loop(&self, helper: HandleCore<G, D>)
Connect a
Stream
to be the input of a loop variable. Read moresource§impl<S, D> Debug for StreamCore<S, D>where
S: Scope,
impl<S, D> Debug for StreamCore<S, D>where S: Scope,
source§impl<G: Scope, T: Timestamp + Refines<G::Timestamp>, C: Data + Container> Enter<G, T, C> for StreamCore<G, C>
impl<G: Scope, T: Timestamp + Refines<G::Timestamp>, C: Data + Container> Enter<G, T, C> for StreamCore<G, C>
source§impl<G: Scope, C> Exchange<<C as Container>::Item> for StreamCore<G, C>where
C: PushPartitioned + ExchangeData,
C::Item: ExchangeData,
impl<G: Scope, C> Exchange<<C as Container>::Item> for StreamCore<G, C>where C: PushPartitioned + ExchangeData, C::Item: ExchangeData,
source§impl<G: Scope, C> Inspect<G, Rc<C>> for StreamCore<G, Rc<C>>where
C: AsRef<[C::Item]> + Container,
impl<G: Scope, C> Inspect<G, Rc<C>> for StreamCore<G, Rc<C>>where C: AsRef<[C::Item]> + Container,
source§fn inspect_core<F>(&self, func: F) -> Selfwhere
F: FnMut(Result<(&G::Timestamp, &[C::Item]), &[G::Timestamp]>) + 'static,
fn inspect_core<F>(&self, func: F) -> Selfwhere F: FnMut(Result<(&G::Timestamp, &[C::Item]), &[G::Timestamp]>) + 'static,
Runs a supplied closure on each observed data batch, and each frontier advancement. Read more
source§fn inspect(&self, func: impl FnMut(&C::Item) + 'static) -> Self
fn inspect(&self, func: impl FnMut(&C::Item) + 'static) -> Self
Runs a supplied closure on each observed data element. Read more
source§impl<G: Scope, D: Data + Columnation> Inspect<G, TimelyStack<D>> for StreamCore<G, TimelyStack<D>>
impl<G: Scope, D: Data + Columnation> Inspect<G, TimelyStack<D>> for StreamCore<G, TimelyStack<D>>
source§fn inspect_core<F>(&self, func: F) -> Selfwhere
F: FnMut(Result<(&G::Timestamp, &[D]), &[G::Timestamp]>) + 'static,
fn inspect_core<F>(&self, func: F) -> Selfwhere F: FnMut(Result<(&G::Timestamp, &[D]), &[G::Timestamp]>) + 'static,
Runs a supplied closure on each observed data batch, and each frontier advancement. Read more
source§fn inspect(&self, func: impl FnMut(&C::Item) + 'static) -> Self
fn inspect(&self, func: impl FnMut(&C::Item) + 'static) -> Self
Runs a supplied closure on each observed data element. Read more
source§impl<G: Scope, D: Data> Inspect<G, Vec<D, Global>> for StreamCore<G, Vec<D>>
impl<G: Scope, D: Data> Inspect<G, Vec<D, Global>> for StreamCore<G, Vec<D>>
source§fn inspect_core<F>(&self, func: F) -> Selfwhere
F: FnMut(Result<(&G::Timestamp, &[D]), &[G::Timestamp]>) + 'static,
fn inspect_core<F>(&self, func: F) -> Selfwhere F: FnMut(Result<(&G::Timestamp, &[D]), &[G::Timestamp]>) + 'static,
Runs a supplied closure on each observed data batch, and each frontier advancement. Read more
source§fn inspect(&self, func: impl FnMut(&C::Item) + 'static) -> Self
fn inspect(&self, func: impl FnMut(&C::Item) + 'static) -> Self
Runs a supplied closure on each observed data element. Read more
source§impl<G: Scope, C: Container> InspectCore<G, C> for StreamCore<G, C>
impl<G: Scope, C: Container> InspectCore<G, C> for StreamCore<G, C>
source§fn inspect_container<F>(&self, func: F) -> StreamCore<G, C>where
F: FnMut(Result<(&G::Timestamp, &C), &[G::Timestamp]>) + 'static,
fn inspect_container<F>(&self, func: F) -> StreamCore<G, C>where F: FnMut(Result<(&G::Timestamp, &C), &[G::Timestamp]>) + 'static,
Runs a supplied closure on each observed container, and each frontier advancement. Read more
source§impl<'a, G: Scope, D: Clone + Container, T: Timestamp + Refines<G::Timestamp>> Leave<G, D> for StreamCore<Child<'a, G, T>, D>
impl<'a, G: Scope, D: Clone + Container, T: Timestamp + Refines<G::Timestamp>> Leave<G, D> for StreamCore<Child<'a, G, T>, D>
source§fn leave(&self) -> StreamCore<G, D>
fn leave(&self) -> StreamCore<G, D>
source§impl<G: Scope, D1: Container> Operator<G, D1> for StreamCore<G, D1>
impl<G: Scope, D1: Container> Operator<G, D1> for StreamCore<G, D1>
source§fn unary_frontier<D2, B, L, P>(
&self,
pact: P,
name: &str,
constructor: B
) -> StreamCore<G, D2>where
D2: Container,
B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L,
L: FnMut(&mut FrontieredInputHandleCore<'_, G::Timestamp, D1, P::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D2, TeeCore<G::Timestamp, D2>>) + 'static,
P: ParallelizationContractCore<G::Timestamp, D1>,
fn unary_frontier<D2, B, L, P>( &self, pact: P, name: &str, constructor: B ) -> StreamCore<G, D2>where D2: Container, B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L, L: FnMut(&mut FrontieredInputHandleCore<'_, G::Timestamp, D1, P::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D2, TeeCore<G::Timestamp, D2>>) + 'static, P: ParallelizationContractCore<G::Timestamp, D1>,
Creates a new dataflow operator that partitions its input stream by a parallelization
strategy
pact
, and repeatedly invokes logic
, the function returned by the function passed as constructor
.
logic
can read from the input stream, write to the output stream, and inspect the frontier at the input. Read moresource§fn unary_notify<D2: Container, L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D2, TeeCore<G::Timestamp, D2>>, &mut Notificator<'_, G::Timestamp>) + 'static, P: ParallelizationContractCore<G::Timestamp, D1>>(
&self,
pact: P,
name: &str,
init: impl IntoIterator<Item = G::Timestamp>,
logic: L
) -> StreamCore<G, D2>
fn unary_notify<D2: Container, L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D2, TeeCore<G::Timestamp, D2>>, &mut Notificator<'_, G::Timestamp>) + 'static, P: ParallelizationContractCore<G::Timestamp, D1>>( &self, pact: P, name: &str, init: impl IntoIterator<Item = G::Timestamp>, logic: L ) -> StreamCore<G, D2>
Creates a new dataflow operator that partitions its input stream by a parallelization
strategy
pact
, and repeatedly invokes logic
, the function returned by the function passed as constructor
.
logic
can read from the input stream, write to the output stream, and inspect the frontier at the input. Read moresource§fn unary<D2, B, L, P>(
&self,
pact: P,
name: &str,
constructor: B
) -> StreamCore<G, D2>where
D2: Container,
B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L,
L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D2, TeeCore<G::Timestamp, D2>>) + 'static,
P: ParallelizationContractCore<G::Timestamp, D1>,
fn unary<D2, B, L, P>( &self, pact: P, name: &str, constructor: B ) -> StreamCore<G, D2>where D2: Container, B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L, L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D2, TeeCore<G::Timestamp, D2>>) + 'static, P: ParallelizationContractCore<G::Timestamp, D1>,
Creates a new dataflow operator that partitions its input stream by a parallelization
strategy
pact
, and repeatedly invokes logic
, the function returned by the function passed as constructor
.
logic
can read from the input stream, and write to the output stream. Read moresource§fn binary_frontier<D2, D3, B, L, P1, P2>(
&self,
other: &StreamCore<G, D2>,
pact1: P1,
pact2: P2,
name: &str,
constructor: B
) -> StreamCore<G, D3>where
D2: Container,
D3: Container,
B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L,
L: FnMut(&mut FrontieredInputHandleCore<'_, G::Timestamp, D1, P1::Puller>, &mut FrontieredInputHandleCore<'_, G::Timestamp, D2, P2::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D3, TeeCore<G::Timestamp, D3>>) + 'static,
P1: ParallelizationContractCore<G::Timestamp, D1>,
P2: ParallelizationContractCore<G::Timestamp, D2>,
fn binary_frontier<D2, D3, B, L, P1, P2>( &self, other: &StreamCore<G, D2>, pact1: P1, pact2: P2, name: &str, constructor: B ) -> StreamCore<G, D3>where D2: Container, D3: Container, B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L, L: FnMut(&mut FrontieredInputHandleCore<'_, G::Timestamp, D1, P1::Puller>, &mut FrontieredInputHandleCore<'_, G::Timestamp, D2, P2::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D3, TeeCore<G::Timestamp, D3>>) + 'static, P1: ParallelizationContractCore<G::Timestamp, D1>, P2: ParallelizationContractCore<G::Timestamp, D2>,
Creates a new dataflow operator that partitions its input streams by a parallelization
strategy
pact
, and repeatedly invokes logic
, the function returned by the function passed as constructor
.
logic
can read from the input streams, write to the output stream, and inspect the frontier at the inputs. Read moresource§fn binary_notify<D2: Container, D3: Container, L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P1::Puller>, &mut InputHandleCore<G::Timestamp, D2, P2::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D3, TeeCore<G::Timestamp, D3>>, &mut Notificator<'_, G::Timestamp>) + 'static, P1: ParallelizationContractCore<G::Timestamp, D1>, P2: ParallelizationContractCore<G::Timestamp, D2>>(
&self,
other: &StreamCore<G, D2>,
pact1: P1,
pact2: P2,
name: &str,
init: impl IntoIterator<Item = G::Timestamp>,
logic: L
) -> StreamCore<G, D3>
fn binary_notify<D2: Container, D3: Container, L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P1::Puller>, &mut InputHandleCore<G::Timestamp, D2, P2::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D3, TeeCore<G::Timestamp, D3>>, &mut Notificator<'_, G::Timestamp>) + 'static, P1: ParallelizationContractCore<G::Timestamp, D1>, P2: ParallelizationContractCore<G::Timestamp, D2>>( &self, other: &StreamCore<G, D2>, pact1: P1, pact2: P2, name: &str, init: impl IntoIterator<Item = G::Timestamp>, logic: L ) -> StreamCore<G, D3>
Creates a new dataflow operator that partitions its input streams by a parallelization
strategy
pact
, and repeatedly invokes logic
, the function returned by the function passed as constructor
.
logic
can read from the input streams, write to the output stream, and inspect the frontier at the inputs. Read moresource§fn binary<D2, D3, B, L, P1, P2>(
&self,
other: &StreamCore<G, D2>,
pact1: P1,
pact2: P2,
name: &str,
constructor: B
) -> StreamCore<G, D3>where
D2: Container,
D3: Container,
B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L,
L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P1::Puller>, &mut InputHandleCore<G::Timestamp, D2, P2::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D3, TeeCore<G::Timestamp, D3>>) + 'static,
P1: ParallelizationContractCore<G::Timestamp, D1>,
P2: ParallelizationContractCore<G::Timestamp, D2>,
fn binary<D2, D3, B, L, P1, P2>( &self, other: &StreamCore<G, D2>, pact1: P1, pact2: P2, name: &str, constructor: B ) -> StreamCore<G, D3>where D2: Container, D3: Container, B: FnOnce(Capability<G::Timestamp>, OperatorInfo) -> L, L: FnMut(&mut InputHandleCore<G::Timestamp, D1, P1::Puller>, &mut InputHandleCore<G::Timestamp, D2, P2::Puller>, &mut OutputHandleCore<'_, G::Timestamp, D3, TeeCore<G::Timestamp, D3>>) + 'static, P1: ParallelizationContractCore<G::Timestamp, D1>, P2: ParallelizationContractCore<G::Timestamp, D2>,
Creates a new dataflow operator that partitions its input streams by a parallelization
strategy
pact
, and repeatedly invokes logic
, the function returned by the function passed as constructor
.
logic
can read from the input streams, write to the output stream, and inspect the frontier at the inputs. Read moresource§fn sink<L, P>(&self, pact: P, name: &str, logic: L)where
L: FnMut(&mut FrontieredInputHandleCore<'_, G::Timestamp, D1, P::Puller>) + 'static,
P: ParallelizationContractCore<G::Timestamp, D1>,
fn sink<L, P>(&self, pact: P, name: &str, logic: L)where L: FnMut(&mut FrontieredInputHandleCore<'_, G::Timestamp, D1, P::Puller>) + 'static, P: ParallelizationContractCore<G::Timestamp, D1>,
Creates a new dataflow operator that partitions its input stream by a parallelization
strategy
pact
, and repeatedly invokes the function logic
which can read from the input stream
and inspect the frontier at the input. Read moresource§impl<S: Scope, C: Container> Reclock<S> for StreamCore<S, C>
impl<S: Scope, C: Container> Reclock<S> for StreamCore<S, C>
source§fn reclock<TC: Container<Item = ()>>(
&self,
clock: &StreamCore<S, TC>
) -> StreamCore<S, C>
fn reclock<TC: Container<Item = ()>>( &self, clock: &StreamCore<S, TC> ) -> StreamCore<S, C>
Delays records until an input is observed on the
clock
input. Read moreConvert a stream into a stream of shared data Read more
Auto Trait Implementations§
impl<S, D> !RefUnwindSafe for StreamCore<S, D>
impl<S, D> !Send for StreamCore<S, D>
impl<S, D> !Sync for StreamCore<S, D>
impl<S, D> Unpin for StreamCore<S, D>where S: Unpin,
impl<S, D> !UnwindSafe for StreamCore<S, D>
Blanket Implementations§
source§impl<G, T, D, E> EnterAt<G, T, D> for Ewhere
G: Scope,
T: Timestamp,
D: Data,
E: Enter<G, Product<<G as ScopeParent>::Timestamp, T>, Vec<D, Global>>,
impl<G, T, D, E> EnterAt<G, T, D> for Ewhere G: Scope, T: Timestamp, D: Data, E: Enter<G, Product<<G as ScopeParent>::Timestamp, T>, Vec<D, Global>>,
source§fn enter_at<F, 'a>(
&self,
scope: &Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>,
initial: F
) -> StreamCore<Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>, Vec<D, Global>>where
F: FnMut(&D) -> T + 'static,
fn enter_at<F, 'a>( &self, scope: &Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>, initial: F ) -> StreamCore<Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>, Vec<D, Global>>where F: FnMut(&D) -> T + 'static,
Moves the
Stream
argument into a child of its current Scope
setting the timestamp for each element by initial
. Read more