Skip to content

Commit 470d732

Browse files
committed
Feedback
1 parent 3f9ee5f commit 470d732

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/context/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,9 @@ impl<'ctx, CTX: private::SealedContext<'ctx>> ContextAwakeables<'ctx> for CTX {}
650650
/// Restate uses an execution log for replay after failures and suspensions.
651651
/// This means that non-deterministic results (e.g. database responses, UUID generation) need to be stored in the execution log.
652652
/// The SDK offers some functionalities to help you with this:
653-
/// 1. **[Journaled actions][crate::context::ContextSideEffects#journaled-actions]**: Run any block of code and store the result in Restate. Restate replays the result instead of re-executing the block on retries.
654-
/// 2. **[UUID generator][crate::context::ContextSideEffects#generating-uuids]**: Built-in helpers for generating stable UUIDs. Restate seeds the random number generator with the invocation ID, so it always returns the same value on retries.
655-
/// 3. **[Random generator][crate::context::ContextSideEffects#generating-random-numbers]**: Built-in helpers for generating randoms. Restate seeds the random number generator with the invocation ID, so it always returns the same value on retries.
653+
/// 1. **[Journaled actions][crate::context::ContextSideEffects::run]**: Run any block of code and store the result in Restate. Restate replays the result instead of re-executing the block on retries.
654+
/// 2. **[UUID generator][crate::context::ContextSideEffects::rand_uuid]**: Built-in helpers for generating stable UUIDs. Restate seeds the random number generator with the invocation ID, so it always returns the same value on retries.
655+
/// 3. **[Random generator][crate::context::ContextSideEffects::rand]**: Built-in helpers for generating randoms. Restate seeds the random number generator with the invocation ID, so it always returns the same value on retries.
656656
///
657657
pub trait ContextSideEffects<'ctx>: private::SealedContext<'ctx> {
658658
/// ## Journaled actions

src/lib.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@
1616
//! - [Quickstart](https://docs.restate.dev/get_started/quickstart?sdk=rust)
1717
//! - [Do the Tour of Restate to try out the APIs](https://docs.restate.dev/get_started/tour/?sdk=rust)
1818
//!
19+
//! # Features
20+
//!
21+
//! Have a look at the following SDK capabilities:
22+
//!
23+
//! - [Service Communication][crate::context::ContextClient]: Durable RPC and messaging between services (optionally with a delay).
24+
//! - [Journaling Results][crate::context::ContextSideEffects]: Persist results in Restate's log to avoid re-execution on retries
25+
//! - State: [read][crate::context::ContextReadState] and [write](crate::context::ContextWriteState): Store and retrieve state in Restate's key-value store
26+
//! - [Scheduling & Timers][crate::context::ContextTimers]: Let a handler pause for a certain amount of time. Restate durably tracks the timer across failures.
27+
//! - [Awakeables][crate::context::ContextAwakeables]: Durable Futures to wait for events and the completion of external tasks.
28+
//! - [Error Handling][crate::errors]: Restate retries failures infinitely. Use `TerminalError` to stop retries.
29+
//! - [Serialization][crate::serde]: The SDK serializes results to send them to the Server.
30+
//! - [Serving][crate::http_server]: Start an HTTP server to expose services.
31+
//!
1932
//! # SDK Overview
2033
//!
2134
//! The Restate Rust SDK lets you implement durable handlers. Handlers can be part of three types of services:
@@ -179,19 +192,6 @@
179192
//! - [Virtual Object](object)
180193
//! - [Workflow](workflow)
181194
//!
182-
//! # Features
183-
//!
184-
//! Have a look at the following SDK capabilities:
185-
//!
186-
//! - [Service Communication][crate::context::ContextClient]: Durable RPC and messaging between services (optionally with a delay).
187-
//! - [Journaling Results][crate::context::ContextSideEffects]: Persist results in Restate's log to avoid re-execution on retries
188-
//! - State: [read][crate::context::ContextReadState] and [write](crate::context::ContextWriteState): Store and retrieve state in Restate's key-value store
189-
//! - [Scheduling & Timers][crate::context::ContextTimers]: Let a handler pause for a certain amount of time. Restate durably tracks the timer across failures.
190-
//! - [Awakeables][crate::context::ContextAwakeables]: Durable Futures to wait for events and the completion of external tasks.
191-
//! - [Error Handling][crate::errors]: Restate retries failures infinitely. Use `TerminalError` to stop retries.
192-
//! - [Serialization][crate::serde]: The SDK serializes results to send them to the Server.
193-
//! - [Serving][crate::http_server]: Start an HTTP server to expose services.
194-
//!
195195
//!
196196
//! ### Logging
197197
//!
@@ -421,7 +421,7 @@ pub use restate_sdk_macros::object;
421421
///
422422
/// Every workflow needs a `run` handler.
423423
/// This handler has access to the same SDK features as Service and Virtual Object handlers.
424-
/// In the example above, we use [`ctx.run`][crate::context::ContextSideEffects] to log the sending of the email in Restate and avoid re-execution on replay.
424+
/// In the example above, we use [`ctx.run`][crate::context::ContextSideEffects::run] to log the sending of the email in Restate and avoid re-execution on replay.
425425
///
426426
///
427427
/// ## Shared handlers

0 commit comments

Comments
 (0)