Skip to main content

TypedGraphBuilder

Struct TypedGraphBuilder 

Source
pub struct TypedGraphBuilder { /* private fields */ }
Expand description

Consuming builder for Datum’s static, typed GraphDSL subset.

This builder is a thin wrapper around GraphBuilder. Stage registration, runtime completeness validation, and immutable blueprint construction are shared with the existing builder, so graphs built here use the same ExecutorMode::Auto tier selection and execution semantics.

The subset intentionally excludes dynamic arity and erased wiring: use GraphBuilder / GraphDsl::try_create for cycles, plan-driven graph construction, variable-arity junctions, connect_any, wire, and other dynamic or interop cases.

Implementations§

Source§

impl TypedGraphBuilder

Source

pub fn new() -> Self

Create an empty typed builder.

Source

pub fn add_source<Out, G>(self, stage: G) -> (Self, OpenOutlet<Out>)
where Out: 'static, G: GraphStage<Shape = SourceShape<Out>>,

Add a source-shaped graph stage and return its one open outlet.

Source

pub fn add_source_with_attributes<Out, G>( self, stage: G, attributes: Attributes, ) -> (Self, OpenOutlet<Out>)
where Out: 'static, G: GraphStage<Shape = SourceShape<Out>>,

Add a source-shaped graph stage with explicit attributes and return its one open outlet.

Source

pub fn add_flow<In, Out, G>( self, stage: G, ) -> (Self, OpenInlet<In>, OpenOutlet<Out>)
where In: 'static, Out: 'static, G: GraphStage<Shape = FlowShape<In, Out>>,

Add a one-in/one-out flow-shaped graph stage.

Source

pub fn add_flow_with_attributes<In, Out, G>( self, stage: G, attributes: Attributes, ) -> (Self, OpenInlet<In>, OpenOutlet<Out>)
where In: 'static, Out: 'static, G: GraphStage<Shape = FlowShape<In, Out>>,

Add a one-in/one-out flow-shaped graph stage with explicit attributes.

Source

pub fn add_sink<In, G>(self, stage: G) -> (Self, OpenInlet<In>)
where In: 'static, G: GraphStage<Shape = SinkShape<In>>,

Add a sink-shaped graph stage and return its one open inlet.

Source

pub fn add_sink_with_attributes<In, G>( self, stage: G, attributes: Attributes, ) -> (Self, OpenInlet<In>)
where In: 'static, G: GraphStage<Shape = SinkShape<In>>,

Add a sink-shaped graph stage with explicit attributes and return its one open inlet.

Source

pub fn add_broadcast2<T>(self) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
where T: Clone + Send + 'static,

Add a two-output Broadcast junction.

Source

pub fn add_broadcast2_with_attributes<T>( self, attributes: Attributes, ) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
where T: Clone + Send + 'static,

Add a two-output Broadcast junction with explicit attributes.

Source

pub fn add_balance2<T>(self) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
where T: Clone + Send + 'static,

Add a two-output Balance junction.

Source

pub fn add_balance2_with_attributes<T>( self, attributes: Attributes, ) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
where T: Clone + Send + 'static,

Add a two-output Balance junction with explicit attributes.

Source

pub fn add_merge2<T>(self) -> (Self, [OpenInlet<T>; 2], OpenOutlet<T>)
where T: Clone + Send + 'static,

Add a two-input Merge junction.

Source

pub fn add_merge2_with_attributes<T>( self, attributes: Attributes, ) -> (Self, [OpenInlet<T>; 2], OpenOutlet<T>)
where T: Clone + Send + 'static,

Add a two-input Merge junction with explicit attributes.

Source

pub fn add_zip<Left, Right>( self, ) -> (Self, OpenInlet<Left>, OpenInlet<Right>, OpenOutlet<(Left, Right)>)
where Left: Clone + Send + 'static, Right: Clone + Send + 'static,

Add a two-input Zip junction.

Source

pub fn add_zip_with_attributes<Left, Right>( self, attributes: Attributes, ) -> (Self, OpenInlet<Left>, OpenInlet<Right>, OpenOutlet<(Left, Right)>)
where Left: Clone + Send + 'static, Right: Clone + Send + 'static,

Add a two-input Zip junction with explicit attributes.

Source

pub fn connect<T: 'static>( self, outlet: OpenOutlet<T>, inlet: OpenInlet<T>, ) -> StreamResult<Self>

Connect one open outlet to one open inlet, consuming both tokens.

The element type T must match at compile time. The wrapped GraphBuilder still performs ownership, direction, and single-use validation, preserving the existing runtime diagnostics for cases that depend on composed graph state.

Source

pub fn finish<S: Shape>(self, shape: S) -> StreamResult<GraphBlueprint<S>>

Finish this typed builder into the same immutable blueprint type as GraphDsl::try_create.

Trait Implementations§

Source§

impl Debug for TypedGraphBuilder

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TypedGraphBuilder

Source§

fn default() -> TypedGraphBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Message for T
where T: Any + Send + 'static,

Source§

fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>

Convert a BoxedMessage to this concrete type
Source§

fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>

Convert this message to a BoxedMessage
Source§

impl<T> State for T
where T: Any + Send + 'static,

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more