@@ -8,7 +8,6 @@ use std::time::Duration;
88
99mod request;
1010mod run;
11-
1211pub use request:: { Request , RequestTarget } ;
1312pub use run:: { RunClosure , RunFuture , RunRetryPolicy } ;
1413
@@ -268,7 +267,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
268267/// You can do request-response calls to Services, Virtual Objects, and Workflows, in the following way:
269268///
270269/// ```
271- /// # #[path = "../examples/services"]
270+ /// # #[path = "../../ examples/services"]
272271/// # mod services;
273272/// # use services::my_service::MyServiceClient;
274273/// # use services::my_virtual_object::MyVirtualObjectClient;
@@ -331,7 +330,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
331330/// Handlers can send messages (a.k.a. one-way calls, or fire-and-forget calls), as follows:
332331///
333332/// ```
334- /// # #[path = "../examples/services"]
333+ /// # #[path = "../../ examples/services"]
335334/// # mod services;
336335/// # use services::my_service::MyServiceClient;
337336/// # use services::my_virtual_object::MyVirtualObjectClient;
@@ -411,7 +410,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextTimers<'ctx> for CTX {}
411410/// For example, assume a handler calls the same Virtual Object twice:
412411///
413412/// ```
414- /// # #[path = "../examples/services"]
413+ /// # #[path = "../../ examples/services"]
415414/// # mod services;
416415/// # use services::my_virtual_object::MyVirtualObjectClient;
417416/// # use restate_sdk::prelude::*;
@@ -577,7 +576,9 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextClient<'ctx> for CTX {}
577576/// /// 3. Wait for the promise to be resolved
578577/// let payload = promise.await?;
579578/// # }
580- /// # fn trigger_task_and_deliver_id(awakeable_id: String){}
579+ /// # async fn trigger_task_and_deliver_id(awakeable_id: String) -> Result<(), HandlerError>{
580+ /// # Ok(())
581+ /// # }
581582/// ```
582583///
583584///
@@ -609,10 +610,11 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextClient<'ctx> for CTX {}
609610/// #
610611/// # async fn handle(ctx: Context<'_>, id: String) -> Result<(), HandlerError> {
611612/// // Resolve the awakeable
612- /// ctx.resolve_awakeable(&id, "hello");
613+ /// ctx.resolve_awakeable(&id, "hello".to_string() );
613614///
614615/// // Or reject the awakeable
615616/// ctx.reject_awakeable(&id, TerminalError::new("my error reason"));
617+ /// # Ok(())
616618/// # }
617619/// ```
618620///
@@ -665,7 +667,7 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextAwakeables<'ctx> for CTX {}
665667/// let response = ctx.run(|| do_db_request()).await?;
666668/// # Ok(())
667669/// # }
668- /// # fn do_db_request() -> Result<String, HandlerError>{
670+ /// # async fn do_db_request() -> Result<String, HandlerError>{
669671/// # Ok("Hello".to_string())
670672/// # }
671673/// ```
0 commit comments