@@ -711,7 +711,7 @@ impl<F, Fut, O> From<F> for WorkflowFunction
711
711
where
712
712
F : Fn ( WfContext ) -> Fut + Send + Sync + ' static ,
713
713
Fut : Future < Output = Result < WfExitValue < O > , anyhow:: Error > > + Send + ' static ,
714
- O : Serialize + Debug ,
714
+ O : Serialize ,
715
715
{
716
716
fn from ( wf_func : F ) -> Self {
717
717
Self :: new ( wf_func)
@@ -724,7 +724,7 @@ impl WorkflowFunction {
724
724
where
725
725
F : Fn ( WfContext ) -> Fut + Send + Sync + ' static ,
726
726
Fut : Future < Output = Result < WfExitValue < O > , anyhow:: Error > > + Send + ' static ,
727
- O : Serialize + Debug ,
727
+ O : Serialize ,
728
728
{
729
729
Self {
730
730
wf_func : Box :: new ( move |ctx : WfContext | {
@@ -750,7 +750,7 @@ pub type WorkflowResult<T> = Result<WfExitValue<T>, anyhow::Error>;
750
750
751
751
/// Workflow functions may return these values when exiting
752
752
#[ derive( Debug , derive_more:: From ) ]
753
- pub enum WfExitValue < T : Debug > {
753
+ pub enum WfExitValue < T > {
754
754
/// Continue the workflow as a new execution
755
755
#[ from( ignore) ]
756
756
ContinueAsNew ( Box < ContinueAsNewWorkflowExecution > ) ,
@@ -764,23 +764,27 @@ pub enum WfExitValue<T: Debug> {
764
764
Normal ( T ) ,
765
765
}
766
766
767
- impl < T : Debug > WfExitValue < T > {
767
+ impl < T > WfExitValue < T > {
768
768
/// Construct a [WfExitValue::ContinueAsNew] variant (handles boxing)
769
769
pub fn continue_as_new ( can : ContinueAsNewWorkflowExecution ) -> Self {
770
770
Self :: ContinueAsNew ( Box :: new ( can) )
771
771
}
772
772
}
773
773
774
774
/// Activity functions may return these values when exiting
775
- #[ derive( derive_more:: From ) ]
776
- pub enum ActExitValue < T : Debug > {
775
+ pub enum ActExitValue < T > {
777
776
/// Completion requires an asynchronous callback
778
- #[ from( ignore) ]
779
777
WillCompleteAsync ,
780
778
/// Finish with a result
781
779
Normal ( T ) ,
782
780
}
783
781
782
+ impl < T : AsJsonPayloadExt > From < T > for ActExitValue < T > {
783
+ fn from ( t : T ) -> Self {
784
+ Self :: Normal ( t)
785
+ }
786
+ }
787
+
784
788
type BoxActFn = Arc <
785
789
dyn Fn ( ActContext , Payload ) -> BoxFuture < ' static , Result < ActExitValue < Payload > , anyhow:: Error > >
786
790
+ Send
@@ -835,7 +839,7 @@ where
835
839
A : FromJsonPayloadExt + Send ,
836
840
Rf : Future < Output = Result < R , anyhow:: Error > > + Send + ' static ,
837
841
R : Into < ActExitValue < O > > ,
838
- O : AsJsonPayloadExt + Debug ,
842
+ O : AsJsonPayloadExt ,
839
843
{
840
844
fn into_activity_fn ( self ) -> BoxActFn {
841
845
let wrapper = move |ctx : ActContext , input : Payload | {
0 commit comments