Skip to main content

Handler

Trait Handler 

Source
pub trait Handler<R: ReplySink>:
    MaybeSend
    + MaybeSync
    + 'static {
    // Required method
    fn handle(
        &self,
        call: SelfRef<RequestCall<'static>>,
        reply: R,
    ) -> impl Future<Output = ()> + MaybeSend + '_;
}

Required Methods§

Source

fn handle( &self, call: SelfRef<RequestCall<'static>>, reply: R, ) -> impl Future<Output = ()> + MaybeSend + '_

Dispatch an incoming call to the appropriate method implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<R: ReplySink> Handler<R> for ()

Source§

async fn handle(&self, _call: SelfRef<RequestCall<'static>>, _reply: R)

Implementors§