pub struct GraphBuilder { /* private fields */ }Expand description
Builder for creating workflow graphs with a fluent API
Implementations§
Source§impl GraphBuilder
impl GraphBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the graph description
Sourcepub async fn add_node(
self,
node_id: impl Into<NodeId>,
node: Arc<dyn Node>,
) -> RGraphResult<Self>
pub async fn add_node( self, node_id: impl Into<NodeId>, node: Arc<dyn Node>, ) -> RGraphResult<Self>
Add a node to the graph
Sourcepub fn add_edge(
self,
from: impl Into<NodeId>,
to: impl Into<NodeId>,
) -> RGraphResult<Self>
pub fn add_edge( self, from: impl Into<NodeId>, to: impl Into<NodeId>, ) -> RGraphResult<Self>
Add an edge between two nodes
Sourcepub fn entry_points(self, entry_points: Vec<NodeId>) -> Self
pub fn entry_points(self, entry_points: Vec<NodeId>) -> Self
Set entry points
Sourcepub fn build(self) -> RGraphResult<WorkflowGraph>
pub fn build(self) -> RGraphResult<WorkflowGraph>
Build the workflow graph
Auto Trait Implementations§
impl Freeze for GraphBuilder
impl !RefUnwindSafe for GraphBuilder
impl Send for GraphBuilder
impl Sync for GraphBuilder
impl Unpin for GraphBuilder
impl !UnwindSafe for GraphBuilder
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