Skip to main content

ServiceHandler

Trait ServiceHandler 

Source
pub trait ServiceHandler<S>:
    Send
    + Sync
    + 'static
where S: Service,
{ // Required method fn call<'a>( &'a self, context: &'a CallContext, request: <S as Service>::Request, ) -> Pin<Box<dyn Future<Output = Result<<S as Service>::Response, SaddleError>> + Send + 'a>>; }
Expand description

The implementation boundary for a Service contract S.

Required Methods§

Source

fn call<'a>( &'a self, context: &'a CallContext, request: <S as Service>::Request, ) -> Pin<Box<dyn Future<Output = Result<<S as Service>::Response, SaddleError>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§