pub struct ParallelSubgraphs { /* private fields */ }Expand description
Parallel subgraph executor - runs multiple subgraphs concurrently
Implementations§
Source§impl ParallelSubgraphs
impl ParallelSubgraphs
Sourcepub fn add(
self,
name: impl Into<String>,
graph: Graph,
mapping: StateMapping,
) -> Self
pub fn add( self, name: impl Into<String>, graph: Graph, mapping: StateMapping, ) -> Self
Add a subgraph
Sourcepub fn with_strategy(self, strategy: MergeStrategy) -> Self
pub fn with_strategy(self, strategy: MergeStrategy) -> Self
Set merge strategy
Sourcepub async fn execute(&self, state: &GraphState) -> Result<GraphState, CrewError>
pub async fn execute(&self, state: &GraphState) -> Result<GraphState, CrewError>
Execute all subgraphs in parallel
Trait Implementations§
Source§impl Default for ParallelSubgraphs
impl Default for ParallelSubgraphs
Source§impl NodeFn for ParallelSubgraphs
impl NodeFn for ParallelSubgraphs
Auto Trait Implementations§
impl Freeze for ParallelSubgraphs
impl !RefUnwindSafe for ParallelSubgraphs
impl Send for ParallelSubgraphs
impl Sync for ParallelSubgraphs
impl Unpin for ParallelSubgraphs
impl UnsafeUnpin for ParallelSubgraphs
impl !UnwindSafe for ParallelSubgraphs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more