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
impl TypedGraphBuilder
Sourcepub fn add_source<Out, G>(self, stage: G) -> (Self, OpenOutlet<Out>)where
Out: 'static,
G: GraphStage<Shape = SourceShape<Out>>,
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.
Sourcepub fn add_source_with_attributes<Out, G>(
self,
stage: G,
attributes: Attributes,
) -> (Self, OpenOutlet<Out>)where
Out: 'static,
G: GraphStage<Shape = SourceShape<Out>>,
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.
Sourcepub 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>>,
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.
Sourcepub 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>>,
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.
Sourcepub fn add_sink<In, G>(self, stage: G) -> (Self, OpenInlet<In>)where
In: 'static,
G: GraphStage<Shape = SinkShape<In>>,
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.
Sourcepub fn add_sink_with_attributes<In, G>(
self,
stage: G,
attributes: Attributes,
) -> (Self, OpenInlet<In>)where
In: 'static,
G: GraphStage<Shape = SinkShape<In>>,
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.
Sourcepub fn add_broadcast2<T>(self) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
pub fn add_broadcast2<T>(self) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
Add a two-output Broadcast junction.
Sourcepub fn add_broadcast2_with_attributes<T>(
self,
attributes: Attributes,
) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
pub fn add_broadcast2_with_attributes<T>( self, attributes: Attributes, ) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
Add a two-output Broadcast junction with explicit attributes.
Sourcepub fn add_balance2<T>(self) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
pub fn add_balance2<T>(self) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
Add a two-output Balance junction.
Sourcepub fn add_balance2_with_attributes<T>(
self,
attributes: Attributes,
) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
pub fn add_balance2_with_attributes<T>( self, attributes: Attributes, ) -> (Self, OpenInlet<T>, [OpenOutlet<T>; 2])
Add a two-output Balance junction with explicit attributes.
Sourcepub fn add_merge2<T>(self) -> (Self, [OpenInlet<T>; 2], OpenOutlet<T>)
pub fn add_merge2<T>(self) -> (Self, [OpenInlet<T>; 2], OpenOutlet<T>)
Add a two-input Merge junction.
Sourcepub fn add_merge2_with_attributes<T>(
self,
attributes: Attributes,
) -> (Self, [OpenInlet<T>; 2], OpenOutlet<T>)
pub fn add_merge2_with_attributes<T>( self, attributes: Attributes, ) -> (Self, [OpenInlet<T>; 2], OpenOutlet<T>)
Add a two-input Merge junction with explicit attributes.
Sourcepub fn add_zip<Left, Right>(
self,
) -> (Self, OpenInlet<Left>, OpenInlet<Right>, OpenOutlet<(Left, Right)>)
pub fn add_zip<Left, Right>( self, ) -> (Self, OpenInlet<Left>, OpenInlet<Right>, OpenOutlet<(Left, Right)>)
Add a two-input Zip junction.
Sourcepub fn add_zip_with_attributes<Left, Right>(
self,
attributes: Attributes,
) -> (Self, OpenInlet<Left>, OpenInlet<Right>, OpenOutlet<(Left, Right)>)
pub fn add_zip_with_attributes<Left, Right>( self, attributes: Attributes, ) -> (Self, OpenInlet<Left>, OpenInlet<Right>, OpenOutlet<(Left, Right)>)
Add a two-input Zip junction with explicit attributes.
Sourcepub fn connect<T: 'static>(
self,
outlet: OpenOutlet<T>,
inlet: OpenInlet<T>,
) -> StreamResult<Self>
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.
Sourcepub fn finish<S: Shape>(self, shape: S) -> StreamResult<GraphBlueprint<S>>
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.