@@ -5,19 +5,31 @@ use crate::{
55 node:: { Node , NodeOutput as NodeOutputStruct } ,
66} ;
77
8- pub struct OneOfSequentialFlowBuilder < Input , Output , Error , NodeTypes = ( ) , NodeIOETypes = ( ) > {
8+ pub struct OneOfSequentialFlowBuilder < Input , Output , Error , NodeTypes = ( ) , NodeIOETypes = ( ) >
9+ where
10+ // Trait bounds for better and nicer errors
11+ Input : Send + Clone ,
12+ {
913 _ioe : PhantomData < ( Input , Output , Error ) > ,
1014 _nodes_io : PhantomData < NodeIOETypes > ,
1115 nodes : NodeTypes ,
1216}
1317
14- impl < Input , Output , Error > Default for OneOfSequentialFlowBuilder < Input , Output , Error > {
18+ impl < Input , Output , Error > Default for OneOfSequentialFlowBuilder < Input , Output , Error >
19+ where
20+ // Trait bounds for better and nicer errors
21+ Input : Send + Clone ,
22+ {
1523 fn default ( ) -> Self {
1624 Self :: new ( )
1725 }
1826}
1927
20- impl < Input , Output , Error > OneOfSequentialFlowBuilder < Input , Output , Error > {
28+ impl < Input , Output , Error > OneOfSequentialFlowBuilder < Input , Output , Error >
29+ where
30+ // Trait bounds for better and nicer errors
31+ Input : Send + Clone ,
32+ {
2133 #[ must_use]
2234 pub fn new ( ) -> Self {
2335 Self {
@@ -42,7 +54,9 @@ impl<Input, Output, Error> OneOfSequentialFlowBuilder<Input, Output, Error> {
4254 Input : Into < NodeInput > ,
4355 NodeOutput : Into < Output > ,
4456 NodeError : Into < Error > ,
45- NodeType : Node < NodeInput , NodeOutputStruct < NodeOutput > , NodeError > + Clone ,
57+ NodeType : Node < NodeInput , NodeOutputStruct < NodeOutput > , NodeError > ,
58+ // Trait bounds for better and nicer errors
59+ NodeType : Clone + Send + Sync ,
4660 {
4761 OneOfSequentialFlowBuilder {
4862 _ioe : PhantomData ,
@@ -60,6 +74,9 @@ impl<Input, Output, Error, NodeTypes, LastNodeIOETypes, OtherNodeIOETypes>
6074 NodeTypes ,
6175 ChainLink < OtherNodeIOETypes , LastNodeIOETypes > ,
6276 >
77+ where
78+ // Trait bounds for better and nicer errors
79+ Input : Send + Clone ,
6380{
6481 #[ allow( clippy:: type_complexity) ]
6582 pub fn add_node < NodeType , NodeInput , NodeOutput , NodeError > (
@@ -79,7 +96,9 @@ impl<Input, Output, Error, NodeTypes, LastNodeIOETypes, OtherNodeIOETypes>
7996 Input : Into < NodeInput > ,
8097 NodeOutput : Into < Output > ,
8198 NodeError : Into < Error > ,
82- NodeType : Node < NodeInput , NodeOutputStruct < NodeOutput > , NodeError > + Clone ,
99+ NodeType : Node < NodeInput , NodeOutputStruct < NodeOutput > , NodeError > ,
100+ // Trait bounds for better and nicer errors
101+ NodeType : Clone + Send + Sync ,
83102 {
84103 OneOfSequentialFlowBuilder {
85104 _ioe : PhantomData ,
0 commit comments