Skip to main content

RouteHandler

Trait RouteHandler 

Source
pub trait RouteHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn call(
        &self,
        request: BootRequest,
    ) -> BoxFuture<'static, Result<BootResponse>>;
}
Expand description

Type-erased route handler used by adapters.

Required Methods§

Source

fn call(&self, request: BootRequest) -> BoxFuture<'static, Result<BootResponse>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, Fut> RouteHandler for F
where F: Fn(BootRequest) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<BootResponse>> + Send + 'static,