1 2 3 4 5 6 7 8 9 10 11 12 13 14
use restate_sdk::prelude::*; struct MutSelf; // Handlers must take `&self`, not `&mut self`. #[service] impl MutSelf { #[handler] async fn greet(&mut self, _ctx: Context<'_>, name: String) -> HandlerResult<String> { Ok(name) } } fn main() {}