pub trait RouteCallback<T: SEResource>: Send + Sync + 'static {
    // Required method
    fn callback(
        &self,
        notif: Notification<T>
    ) -> Pin<Box<dyn Future<Output = SEPResponse> + Send + 'static>>;
}
Available on crate feature pubsub only.
Expand description

A trait implemented by types that can be used as a route callback in a ClientNotifServer.

Required Methods§

source

fn callback( &self, notif: Notification<T> ) -> Pin<Box<dyn Future<Output = SEPResponse> + Send + 'static>>

Implementors§

source§

impl<F, R, T: SEResource> RouteCallback<T> for Fwhere F: Fn(Notification<T>) -> R + Send + Sync + 'static, R: Future<Output = SEPResponse> + Send + 'static,

Automatically implemented for all Fn with a matching function signature.