Struct Child

Source
pub struct Child<'a, G, T>{
    pub subgraph: &'a RefCell<SubgraphBuilder<<G as ScopeParent>::Timestamp, T>>,
    pub parent: G,
    pub logging: Option<Logger<TimelyEvent, usize>>,
    pub progress_logging: Option<Logger<TimelyProgressEvent, usize>>,
}
Expand description

A Child wraps a Subgraph and a parent G: Scope. It manages the addition of Operates to a subgraph, and the connection of edges between them.

Fields§

§subgraph: &'a RefCell<SubgraphBuilder<<G as ScopeParent>::Timestamp, T>>

The subgraph under assembly.

§parent: G

A copy of the child’s parent scope.

§logging: Option<Logger<TimelyEvent, usize>>

The log writer for this scope.

§progress_logging: Option<Logger<TimelyProgressEvent, usize>>

The progress log writer for this scope.

Implementations§

Source§

impl<'a, G, T> Child<'a, G, T>

Source

pub fn index(&self) -> usize

This worker’s unique identifier.

Ranges from 0 to self.peers() - 1.

Source

pub fn peers(&self) -> usize

The total number of workers in the computation.

Trait Implementations§

Source§

impl<'a, G, T> AsWorker for Child<'a, G, T>

Source§

fn config(&self) -> &Config

Returns the worker configuration parameters.
Source§

fn index(&self) -> usize

Index of the worker among its peers.
Source§

fn peers(&self) -> usize

Number of peer workers.
Source§

fn allocate<D>( &mut self, identifier: usize, address: &[usize], ) -> (Vec<Box<dyn Push<Message<D>>>>, Box<dyn Pull<Message<D>>>)
where D: Data,

Allocates a new channel from a supplied identifier and address. Read more
Source§

fn pipeline<D>( &mut self, identifier: usize, address: &[usize], ) -> (Pusher<Message<D>, Pusher<Message<D>>>, Puller<Message<D>, Puller<Message<D>>>)
where D: 'static,

Constructs a pipeline channel from the worker to itself. Read more
Source§

fn new_identifier(&mut self) -> usize

Allocates a new worker-unique identifier.
Source§

fn log_register(&self) -> RefMut<'_, Registry<usize>>

Provides access to named logging streams.
Source§

fn logging(&self) -> Option<Logger<TimelyEvent, usize>>

Provides access to the timely logging stream.
Source§

impl<'a, G, T> Clone for Child<'a, G, T>

Source§

fn clone(&self) -> Child<'a, G, T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, G, T> LoopVariable<'a, G, T> for Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>
where G: Scope, T: Timestamp,

Source§

fn loop_variable<D>( &mut self, summary: <T as Timestamp>::Summary, ) -> (Handle<Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>, D>, Stream<Child<'a, G, Product<<G as ScopeParent>::Timestamp, T>>, D>)
where D: Data,

Creates a Stream and a Handle to later bind the source of that Stream. Read more
Source§

impl<'a, G, T> Scheduler for Child<'a, G, T>

Source§

fn activations(&self) -> Rc<RefCell<Activations>>

Provides a shared handle to the activation scheduler.
Source§

fn activator_for(&self, path: &[usize]) -> Activator

Constructs an Activator tied to the specified operator address.
Source§

fn sync_activator_for(&self, path: &[usize]) -> SyncActivator

Constructs a SyncActivator tied to the specified operator address.
Source§

impl<'a, G, T> Scope for Child<'a, G, T>

Source§

fn name(&self) -> String

A useful name describing the scope.
Source§

fn addr(&self) -> Vec<usize>

A sequence of scope identifiers describing the path from the worker root to this scope.
Source§

fn add_edge(&self, source: Source, target: Target)

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

fn add_operator_with_indices( &mut self, operator: Box<dyn Operate<<Child<'a, G, T> as ScopeParent>::Timestamp>>, local: usize, global: usize, )

Adds a child Operate to the builder’s scope using supplied indices. Read more
Source§

fn allocate_operator_index(&mut self) -> usize

Allocates a new scope-local operator index. Read more
Source§

fn scoped<T2, R, F>(&mut self, name: &str, func: F) -> R
where T2: Timestamp + Refines<T>, F: FnOnce(&mut Child<'_, Child<'a, G, T>, T2>) -> R,

Creates a dataflow subgraph. Read more
Source§

fn add_operator(&mut self, operator: Box<dyn Operate<Self::Timestamp>>) -> usize

Adds a child Operate to the builder’s scope. Returns the new child’s index.
Source§

fn add_operator_with_index( &mut self, operator: Box<dyn Operate<Self::Timestamp>>, index: usize, )

Adds a child Operate to the builder’s scope using a supplied index. Read more
Source§

fn iterative<T, R, F>(&mut self, func: F) -> R
where T: Timestamp, F: FnOnce(&mut Child<'_, Self, Product<Self::Timestamp, T>>) -> R,

Creates a iterative dataflow subgraph. Read more
Source§

fn region<R, F>(&mut self, func: F) -> R
where F: FnOnce(&mut Child<'_, Self, Self::Timestamp>) -> R,

Creates a dataflow region with the same timestamp. Read more
Source§

fn region_named<R, F>(&mut self, name: &str, func: F) -> R
where F: FnOnce(&mut Child<'_, Self, Self::Timestamp>) -> R,

Creates a dataflow region with the same timestamp. Read more
Source§

impl<'a, G, T> ScopeParent for Child<'a, G, T>

Source§

type Timestamp = T

The timestamp associated with data in this scope.

Auto Trait Implementations§

§

impl<'a, G, T> Freeze for Child<'a, G, T>
where G: Freeze,

§

impl<'a, G, T> !RefUnwindSafe for Child<'a, G, T>

§

impl<'a, G, T> !Send for Child<'a, G, T>

§

impl<'a, G, T> !Sync for Child<'a, G, T>

§

impl<'a, G, T> Unpin for Child<'a, G, T>
where G: Unpin,

§

impl<'a, G, T> !UnwindSafe for Child<'a, G, T>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<G, D> Concatenate<G, D> for G
where G: Scope, D: Data,

Source§

fn concatenate<I>(&self, sources: I) -> Stream<G, D>
where I: IntoIterator<Item = Stream<G, D>>,

Merge the contents of multiple streams. Read more
Source§

impl<G> Feedback<G> for G
where G: Scope,

Source§

fn feedback<D>( &mut self, summary: <<G as ScopeParent>::Timestamp as Timestamp>::Summary, ) -> (Handle<G, D>, Stream<G, D>)
where D: Data,

Creates a Stream and a Handle to later bind the source of that Stream. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<G> UnorderedInput<G> for G
where G: Scope,

Source§

fn new_unordered_input<D>( &mut self, ) -> ((UnorderedHandle<<G as ScopeParent>::Timestamp, D>, ActivateCapability<<G as ScopeParent>::Timestamp>), Stream<G, D>)
where D: Data,

Create a new capability-based Stream and Handle through which to supply input. This input supports multiple open epochs (timestamps) at the same time. Read more
Source§

impl<T> Data for T
where T: Clone + 'static,