pub struct OperatorBuilder<G: Scope> { /* private fields */ }
Expand description

Builds operators with generic shape.

Implementations§

source§

impl<G: Scope> OperatorBuilder<G>

source

pub fn new(name: String, scope: G) -> Self

Allocates a new generic operator builder from its containing scope.

source

pub fn set_notify(&mut self, notify: bool)

Indicates whether the operator requires frontier information.

source

pub fn new_input<C: Container, P>( &mut self, stream: &StreamCore<G, C>, pact: P, ) -> InputHandleCore<G::Timestamp, C, P::Puller>

Adds a new input to a generic operator builder, returning the Pull implementor to use.

source

pub fn new_input_connection<C: Container, P>( &mut self, stream: &StreamCore<G, C>, pact: P, connection: Vec<Antichain<<G::Timestamp as Timestamp>::Summary>>, ) -> InputHandleCore<G::Timestamp, C, P::Puller>

Adds a new input with connection information to a generic operator builder, returning the Pull implementor to use.

The connection parameter contains promises made by the operator for each of the existing outputs, that any timestamp appearing at the input, any output timestamp will be greater than or equal to the input timestamp subjected to a Summary greater or equal to some element of the corresponding antichain in connection.

Commonly the connections are either the unit summary, indicating the same timestamp might be produced as output, or an empty antichain indicating that there is no connection from the input to the output.

source

pub fn new_output<CB: ContainerBuilder>( &mut self, ) -> (OutputWrapper<G::Timestamp, CB, Tee<G::Timestamp, CB::Container>>, StreamCore<G, CB::Container>)

Adds a new output to a generic operator builder, returning the Push implementor to use.

source

pub fn new_output_connection<CB: ContainerBuilder>( &mut self, connection: Vec<Antichain<<G::Timestamp as Timestamp>::Summary>>, ) -> (OutputWrapper<G::Timestamp, CB, Tee<G::Timestamp, CB::Container>>, StreamCore<G, CB::Container>)

Adds a new output with connection information to a generic operator builder, returning the Push implementor to use.

The connection parameter contains promises made by the operator for each of the existing inputs, that any timestamp appearing at the input, any output timestamp will be greater than or equal to the input timestamp subjected to a Summary greater or equal to some element of the corresponding antichain in connection.

Commonly the connections are either the unit summary, indicating the same timestamp might be produced as output, or an empty antichain indicating that there is no connection from the input to the output.

source

pub fn build<B, L>(self, constructor: B)
where B: FnOnce(Vec<Capability<G::Timestamp>>) -> L, L: FnMut(&[MutableAntichain<G::Timestamp>]) + 'static,

Creates an operator implementation from supplied logic constructor.

source

pub fn build_reschedule<B, L>(self, constructor: B)
where B: FnOnce(Vec<Capability<G::Timestamp>>) -> L, L: FnMut(&[MutableAntichain<G::Timestamp>]) -> bool + 'static,

Creates an operator implementation from supplied logic constructor.

Unlike build, the supplied closure can indicate if the operator should be considered incomplete. The build method indicates that the operator is never incomplete and can be shut down at the system’s discretion.

source

pub fn index(&self) -> usize

Get the identifier assigned to the operator being constructed

source

pub fn global(&self) -> usize

The operator’s worker-unique identifier.

source

pub fn shape(&self) -> &OperatorShape

Return a reference to the operator’s shape

source

pub fn operator_info(&self) -> OperatorInfo

Creates operator info for the operator.

Trait Implementations§

source§

impl<G: Debug + Scope> Debug for OperatorBuilder<G>
where G::Timestamp: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<G> Freeze for OperatorBuilder<G>
where G: Freeze,

§

impl<G> !RefUnwindSafe for OperatorBuilder<G>

§

impl<G> !Send for OperatorBuilder<G>

§

impl<G> !Sync for OperatorBuilder<G>

§

impl<G> Unpin for OperatorBuilder<G>

§

impl<G> !UnwindSafe for OperatorBuilder<G>

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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.