Skip to main content

Service

Trait Service 

Source
pub trait Service: Send + Sync {
    type Request;
    type Response;
    type Error;

    // Required method
    fn handle(&self, req: Self::Request) -> Result<Self::Response, Self::Error>;
}
Expand description

Abstraction over high-level services exposed by the platform.

Required Associated Types§

Required Methods§

Source

fn handle(&self, req: Self::Request) -> Result<Self::Response, Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§