#[object]
Expand description
Entry-point macro to define a Restate Virtual object.
For more details, check the service
macro documentation.
ยงShared handlers
To define a shared handler, simply annotate the handler with the #[shared]
annotation:
use restate_sdk::prelude::*;
#[restate_sdk::object]
trait Counter {
async fn add(val: u64) -> Result<u64, TerminalError>;
#[shared]
async fn get() -> Result<u64, TerminalError>;
}