Trait Service

Source
pub trait Service {
    type Future: Future<Output = Result<(), Error>> + Send + 'static;

    // Required method
    fn handle(&self, req: ContextInternal) -> Self::Future;
}
Expand description

Trait representing a Restate service.

This is used by codegen.

Required Associated Types§

Source

type Future: Future<Output = Result<(), Error>> + Send + 'static

Required Methods§

Source

fn handle(&self, req: ContextInternal) -> Self::Future

Handle an incoming request.

Implementors§