pub struct GraphBlueprint<S: Shape> { /* private fields */ }Expand description
An immutable, validated graph ready to run. Produced by GraphDsl::create/
try_create. Carries the external Shape, the stages, the wired edges,
the precomputed fused segments, and graph-level Attributes. The run_*
methods are defined in the executor module; running one never mutates the
blueprint, so it can be reused and run concurrently.
Implementations§
Source§impl<S: Shape> GraphBlueprint<S>
impl<S: Shape> GraphBlueprint<S>
pub fn shape(&self) -> S
pub fn stage_count(&self) -> usize
pub fn edge_count(&self) -> usize
pub fn segments(&self) -> &[FusedSegment]
pub fn attributes(&self) -> &Attributes
Sourcepub fn effective_stage_attributes(&self) -> Vec<FusedNodeAttributes>
pub fn effective_stage_attributes(&self) -> Vec<FusedNodeAttributes>
Effective post-merge attributes for every stage in execution order.
Graph-level attributes are inherited by each stage and stage-level attributes override them per key, matching Akka’s closest-wins mental model.
pub fn with_attributes(self, attributes: Attributes) -> Self
pub fn add_attributes(self, attributes: Attributes) -> Self
pub fn named(self, name: impl Into<String>) -> Self
Source§impl<In, Out> GraphBlueprint<FlowShape<In, Out>>
impl<In, Out> GraphBlueprint<FlowShape<In, Out>>
pub fn run_with_input<I>(&self, input: I) -> StreamResult<Vec<Out>>where
I: IntoIterator<Item = In>,
pub fn run_with_input_report<I>(
&self,
input: I,
config: FusedExecutionConfig,
) -> StreamResult<FusedExecutionReport<Out>>where
I: IntoIterator<Item = In>,
pub fn run_count_with_input<I>(&self, input: I) -> StreamResult<usize>where
I: IntoIterator<Item = In>,
pub fn run_count_with_input_report<I>(
&self,
input: I,
config: FusedExecutionConfig,
) -> StreamResult<FusedTerminalReport<usize>>where
I: IntoIterator<Item = In>,
pub fn run_fold_with_input<I, Acc, F>(
&self,
input: I,
zero: Acc,
fold: F,
) -> StreamResult<Acc>where
I: IntoIterator<Item = In>,
F: FnMut(Acc, Out) -> Acc,
pub fn run_fold_with_input_report<I, Acc, F>(
&self,
input: I,
zero: Acc,
fold: F,
config: FusedExecutionConfig,
) -> StreamResult<FusedTerminalReport<Acc>>where
I: IntoIterator<Item = In>,
F: FnMut(Acc, Out) -> Acc,
Source§impl<T> GraphBlueprint<FlowShape<T, T>>where
T: Send + 'static,
impl<T> GraphBlueprint<FlowShape<T, T>>where
T: Send + 'static,
pub fn run_typed_linear_with_input<I>(&self, input: I) -> StreamResult<Vec<T>>where
I: IntoIterator<Item = T>,
pub fn run_typed_linear_with_input_report<I>(
&self,
input: I,
config: FusedExecutionConfig,
) -> StreamResult<FusedExecutionReport<T>>where
I: IntoIterator<Item = T>,
pub fn run_typed_linear_count_with_input<I>(
&self,
input: I,
) -> StreamResult<usize>where
I: IntoIterator<Item = T>,
pub fn run_typed_linear_count_with_input_report<I>(
&self,
input: I,
config: FusedExecutionConfig,
) -> StreamResult<FusedTerminalReport<usize>>where
I: IntoIterator<Item = T>,
pub fn run_typed_linear_fold_with_input<I, Acc, F>(
&self,
input: I,
zero: Acc,
fold: F,
) -> StreamResult<Acc>where
I: IntoIterator<Item = T>,
F: FnMut(Acc, T) -> Acc,
pub fn run_typed_linear_fold_with_input_report<I, Acc, F>(
&self,
input: I,
zero: Acc,
fold: F,
config: FusedExecutionConfig,
) -> StreamResult<FusedTerminalReport<Acc>>where
I: IntoIterator<Item = T>,
F: FnMut(Acc, T) -> Acc,
Sourcepub fn run_async_boundary_count_with_input_report<I>(
&self,
input: I,
config: AsyncBoundaryExecutionConfig,
) -> StreamResult<FusedTerminalReport<usize>>
pub fn run_async_boundary_count_with_input_report<I>( &self, input: I, config: AsyncBoundaryExecutionConfig, ) -> StreamResult<FusedTerminalReport<usize>>
Runs the internal async-boundary count path.
The graph is still runtime-validated through the typed-linear plan, then
split at AsyncBoundary stages and connected with bounded handoff.
The concrete boundary executor is intentionally private so Datum does
not expose multiple public runtime backends.