pub struct Builder<Input, Output, Error, Context, NodeTypes = (), NodeIOETypes = ()>{ /* private fields */ }Expand description
Builder for SequentialFlow.
This builder ensures:
Inputinto the flow can be converted into the input of the first node- output of the last node can be converted into the
Outputof the flow - error of all nodes can be converted into the
Errorof the flow - output of a previous node can be converted into the input of the next node
See also SequentialFlow.
Implementations§
Source§impl<Input, Output, Error, Context> Builder<Input, Output, Error, Context>
impl<Input, Output, Error, Context> Builder<Input, Output, Error, Context>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty builder for SequentialFlow.
Sourcepub fn add_node<NodeType, NodeInput, NodeOutput, NodeError>(
self,
node: NodeType,
) -> Builder<Input, Output, Error, Context, (NodeType,), ((), (NodeInput, NodeOutput<NodeOutput>, NodeError))>
pub fn add_node<NodeType, NodeInput, NodeOutput, NodeError>( self, node: NodeType, ) -> Builder<Input, Output, Error, Context, (NodeType,), ((), (NodeInput, NodeOutput<NodeOutput>, NodeError))>
Source§impl<Input, Output, Error, Context, NodeTypes, LastNodeInType, LastNodeOutType, LastNodeErrType, OtherNodeIOETypes> Builder<Input, Output, Error, Context, NodeTypes, (OtherNodeIOETypes, (LastNodeInType, NodeOutput<LastNodeOutType>, LastNodeErrType))>
impl<Input, Output, Error, Context, NodeTypes, LastNodeInType, LastNodeOutType, LastNodeErrType, OtherNodeIOETypes> Builder<Input, Output, Error, Context, NodeTypes, (OtherNodeIOETypes, (LastNodeInType, NodeOutput<LastNodeOutType>, LastNodeErrType))>
Sourcepub fn add_node<NodeType, NodeInput, NodeOutput, NodeError>(
self,
node: NodeType,
) -> Builder<Input, Output, Error, Context, (NodeTypes, NodeType), ((OtherNodeIOETypes, (LastNodeInType, NodeOutput<LastNodeOutType>, LastNodeErrType)), (NodeInput, NodeOutput<NodeOutput>, NodeError))>
pub fn add_node<NodeType, NodeInput, NodeOutput, NodeError>( self, node: NodeType, ) -> Builder<Input, Output, Error, Context, (NodeTypes, NodeType), ((OtherNodeIOETypes, (LastNodeInType, NodeOutput<LastNodeOutType>, LastNodeErrType)), (NodeInput, NodeOutput<NodeOutput>, NodeError))>
Sourcepub fn build(
self,
) -> Flow<Input, Output, Error, Context, NodeTypes, (OtherNodeIOETypes, (LastNodeInType, NodeOutput<LastNodeOutType>, LastNodeErrType))>where
LastNodeOutType: Into<Output>,
pub fn build(
self,
) -> Flow<Input, Output, Error, Context, NodeTypes, (OtherNodeIOETypes, (LastNodeInType, NodeOutput<LastNodeOutType>, LastNodeErrType))>where
LastNodeOutType: Into<Output>,
Finalizes the builder and produces a SequentialFlow instance.
Trait Implementations§
Auto Trait Implementations§
impl<Input, Output, Error, Context, NodeTypes, NodeIOETypes> Freeze for Builder<Input, Output, Error, Context, NodeTypes, NodeIOETypes>where
NodeTypes: Freeze,
impl<Input, Output, Error, Context, NodeTypes, NodeIOETypes> RefUnwindSafe for Builder<Input, Output, Error, Context, NodeTypes, NodeIOETypes>where
NodeTypes: RefUnwindSafe,
impl<Input, Output, Error, Context, NodeTypes, NodeIOETypes> Send for Builder<Input, Output, Error, Context, NodeTypes, NodeIOETypes>where
NodeTypes: Send,
impl<Input, Output, Error, Context, NodeTypes, NodeIOETypes> Sync for Builder<Input, Output, Error, Context, NodeTypes, NodeIOETypes>where
NodeTypes: Sync,
impl<Input, Output, Error, Context, NodeTypes, NodeIOETypes> Unpin for Builder<Input, Output, Error, Context, NodeTypes, NodeIOETypes>where
NodeTypes: Unpin,
impl<Input, Output, Error, Context, NodeTypes, NodeIOETypes> UnwindSafe for Builder<Input, Output, Error, Context, NodeTypes, NodeIOETypes>where
NodeTypes: UnwindSafe,
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