@@ -19,7 +19,10 @@ use crate::identifiers::{
1919} ;
2020use crate :: journal_v2:: { CompletionId , GetInvocationOutputResult , Signal } ;
2121use crate :: time:: MillisSinceEpoch ;
22- use crate :: { GenerationalNodeId , RestateVersion } ;
22+ use crate :: {
23+ GenerationalNodeId , RestateVersion , bilrost_storage_encode_decode,
24+ flexbuffers_storage_encode_decode,
25+ } ;
2326
2427use bytes:: Bytes ;
2528use bytestring:: ByteString ;
@@ -435,6 +438,8 @@ pub struct ServiceInvocation {
435438 pub restate_version : RestateVersion ,
436439}
437440
441+ flexbuffers_storage_encode_decode ! ( ServiceInvocation ) ;
442+
438443#[ derive( Debug , Copy , Clone , PartialEq , Eq , serde:: Serialize , serde:: Deserialize ) ]
439444#[ serde(
440445 from = "serde_hacks::SubmitNotificationSink" ,
@@ -577,6 +582,8 @@ pub struct InvocationResponse {
577582 pub result : ResponseResult ,
578583}
579584
585+ flexbuffers_storage_encode_decode ! ( InvocationResponse ) ;
586+
580587impl WithInvocationId for InvocationResponse {
581588 fn invocation_id ( & self ) -> InvocationId {
582589 self . target . invocation_id ( )
@@ -623,6 +630,8 @@ pub struct GetInvocationOutputResponse {
623630 pub result : GetInvocationOutputResult ,
624631}
625632
633+ bilrost_storage_encode_decode ! ( GetInvocationOutputResponse ) ;
634+
626635impl WithInvocationId for GetInvocationOutputResponse {
627636 fn invocation_id ( & self ) -> InvocationId {
628637 self . target . invocation_id ( )
@@ -944,6 +953,8 @@ pub struct InvocationTermination {
944953 pub response_sink : Option < InvocationMutationResponseSink > ,
945954}
946955
956+ flexbuffers_storage_encode_decode ! ( InvocationTermination ) ;
957+
947958/// Flavor of the termination. Can be kill (hard stop) or graceful cancel.
948959#[ derive(
949960 Debug , Clone , Copy , Eq , PartialEq , serde:: Serialize , serde:: Deserialize , bilrost:: Enumeration ,
@@ -963,6 +974,8 @@ pub struct PurgeInvocationRequest {
963974 pub response_sink : Option < InvocationMutationResponseSink > ,
964975}
965976
977+ flexbuffers_storage_encode_decode ! ( PurgeInvocationRequest ) ;
978+
966979impl WithInvocationId for PurgeInvocationRequest {
967980 fn invocation_id ( & self ) -> InvocationId {
968981 self . invocation_id
@@ -979,6 +992,8 @@ pub struct ResumeInvocationRequest {
979992 pub response_sink : Option < InvocationMutationResponseSink > ,
980993}
981994
995+ flexbuffers_storage_encode_decode ! ( ResumeInvocationRequest ) ;
996+
982997impl WithInvocationId for ResumeInvocationRequest {
983998 fn invocation_id ( & self ) -> InvocationId {
984999 self . invocation_id
@@ -1001,6 +1016,8 @@ pub struct RestartAsNewInvocationRequest {
10011016 pub response_sink : Option < InvocationMutationResponseSink > ,
10021017}
10031018
1019+ flexbuffers_storage_encode_decode ! ( RestartAsNewInvocationRequest ) ;
1020+
10041021impl WithInvocationId for RestartAsNewInvocationRequest {
10051022 fn invocation_id ( & self ) -> InvocationId {
10061023 self . invocation_id
@@ -1320,6 +1337,8 @@ pub struct AttachInvocationRequest {
13201337 pub response_sink : ServiceInvocationResponseSink ,
13211338}
13221339
1340+ flexbuffers_storage_encode_decode ! ( AttachInvocationRequest ) ;
1341+
13231342impl WithPartitionKey for AttachInvocationRequest {
13241343 fn partition_key ( & self ) -> PartitionKey {
13251344 self . invocation_query . partition_key ( )
@@ -1333,6 +1352,8 @@ pub struct NotifySignalRequest {
13331352 pub signal : Signal ,
13341353}
13351354
1355+ flexbuffers_storage_encode_decode ! ( NotifySignalRequest ) ;
1356+
13361357impl WithInvocationId for NotifySignalRequest {
13371358 fn invocation_id ( & self ) -> InvocationId {
13381359 self . invocation_id
0 commit comments