Struct timely::dataflow::scopes::child::Child
[−]
[src]
pub struct Child<'a, G: ScopeParent, T: Timestamp> { pub subgraph: &'a RefCell<SubgraphBuilder<G::Timestamp, T>>, pub parent: G, }
A Child
wraps a Subgraph
and a parent G: Scope
. It manages the addition
of Operate
s to a subgraph, and the connection of edges between them.
Fields
subgraph: &'a RefCell<SubgraphBuilder<G::Timestamp, T>>
The subgraph under assembly.
parent: G
A copy of the child's parent scope.
Methods
impl<'a, G: ScopeParent, T: Timestamp> Child<'a, G, T>
[src]
fn index(&self) -> usize
[src]
This worker's unique identifier.
Ranges from 0
to self.peers() - 1
.
fn peers(&self) -> usize
[src]
The total number of workers in the computation.
Trait Implementations
impl<'a, A: Allocate, T: Timestamp> Input<'a, A, T> for Child<'a, Root<A>, T>
[src]
fn new_input<D: Data>(
&mut self
) -> (Handle<T, D>, Stream<Child<'a, Root<A>, T>, D>)
[src]
&mut self
) -> (Handle<T, D>, Stream<Child<'a, Root<A>, T>, D>)
Create a new Stream
and Handle
through which to supply input. Read more
fn input_from<D: Data>(
&mut self,
handle: &mut Handle<T, D>
) -> Stream<Child<'a, Root<A>, T>, D>
[src]
&mut self,
handle: &mut Handle<T, D>
) -> Stream<Child<'a, Root<A>, T>, D>
Create a new stream from a supplied interactive handle. Read more
impl<'a, G: ScopeParent, T: Timestamp> LoopVariable<'a, G, T> for Child<'a, G, T>
[src]
fn loop_variable<D: Data>(
&mut self,
limit: T,
summary: T::Summary
) -> (Handle<G::Timestamp, T, D>, Stream<Child<'a, G, T>, D>)
[src]
&mut self,
limit: T,
summary: T::Summary
) -> (Handle<G::Timestamp, T, D>, Stream<Child<'a, G, T>, D>)
Creates a Stream
and a Handle
to later bind the source of that Stream
. Read more
impl<'a, G: ScopeParent, T: Timestamp> ScopeParent for Child<'a, G, T>
[src]
type Timestamp = Product<G::Timestamp, T>
The timestamp associated with data in this scope.
fn new_identifier(&mut self) -> usize
[src]
Allocates a new locally unique identifier.
impl<'a, G: ScopeParent, T: Timestamp> Scope for Child<'a, G, T>
[src]
fn name(&self) -> String
[src]
A useful name describing the scope.
fn addr(&self) -> Vec<usize>
[src]
A sequence of scope identifiers describing the path from the Root
to this scope.
fn add_edge(&self, source: Source, target: Target)
[src]
Connects a source of data with a target of the data. This only links the two for the purposes of tracking progress, rather than effect any data movement itself. Read more
fn add_operator_with_index<SC: Operate<Self::Timestamp> + 'static>(
&mut self,
scope: SC,
index: usize
)
[src]
&mut self,
scope: SC,
index: usize
)
Adds a child Operate
to the builder's scope using a supplied index. Read more
fn allocate_operator_index(&mut self) -> usize
[src]
Allocates a new operator index, for use with add_operator_with_index
.
fn scoped<T2: Timestamp, R, F: FnOnce(&mut Child<Self, T2>) -> R>(
&mut self,
func: F
) -> R
[src]
&mut self,
func: F
) -> R
Creates a Subgraph
from a closure acting on a Child
scope, and returning whatever the closure returns. Read more
fn add_operator<SC: Operate<Self::Timestamp> + 'static>(
&mut self,
scope: SC
) -> usize
[src]
&mut self,
scope: SC
) -> usize
Adds a child Operate
to the builder's scope. Returns the new child's index.
impl<'a, G: ScopeParent, T: Timestamp> Allocate for Child<'a, G, T>
[src]
fn index(&self) -> usize
[src]
The index of the worker out of (0..self.peers())
.
fn peers(&self) -> usize
[src]
The number of workers.
fn allocate<D: Data>(&mut self) -> (Vec<Box<Push<D>>>, Box<Pull<D>>)
[src]
Constructs several send endpoints and one receive endpoint.