File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ use std::time::Duration;
99
1010#[ restate_sdk:: service]
1111trait Greeter {
12- async fn greet ( name : String ) -> HandlerResult < String > ;
12+ async fn greet ( name : String ) -> Result < String , HandlerError > ;
1313}
1414
1515struct GreeterImpl ;
1616
1717impl Greeter for GreeterImpl {
18- async fn greet ( & self , mut ctx : Context < ' _ > , name : String ) -> HandlerResult < String > {
18+ async fn greet ( & self , mut ctx : Context < ' _ > , name : String ) -> Result < String , HandlerError > {
1919 // Durably execute a set of steps; resilient against failures
2020 let greeting_id = ctx. rand_uuid ( ) . to_string ( ) ;
2121 ctx. run ( || send_notification ( & greeting_id, & name) ) . await ?;
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ use utils::{send_notification, send_reminder};
66
77#[ restate_sdk:: service]
88trait Greeter {
9- async fn greet ( name : String ) -> HandlerResult < String > ;
9+ async fn greet ( name : String ) -> Result < String , HandlerError > ;
1010}
1111
1212struct GreeterImpl ;
1313
1414impl Greeter for GreeterImpl {
15- async fn greet ( & self , mut ctx : Context < ' _ > , name : String ) -> HandlerResult < String > {
15+ async fn greet ( & self , mut ctx : Context < ' _ > , name : String ) -> Result < String , HandlerError > {
1616 // Durably execute a set of steps; resilient against failures
1717 let greeting_id = ctx. rand_uuid ( ) . to_string ( ) ;
1818 ctx. run ( || send_notification ( & greeting_id, & name) ) . await ?;
You can’t perform that action at this time.
0 commit comments