pub trait CallbackHandler: Send + DynClone {
type Data;
// Required method
fn call<'a>(
&'a self,
data_sess: CallbackDataAndSession<Self::Data>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError + Send>>> + Send + 'a>>;
}
Expand description
Implement this trait to handle callbacks.
Required Associated Types§
Required Methods§
Sourcefn call<'a>(
&'a self,
data_sess: CallbackDataAndSession<Self::Data>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError + Send>>> + Send + 'a>>
fn call<'a>( &'a self, data_sess: CallbackDataAndSession<Self::Data>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError + Send>>> + Send + 'a>>
HTTP request to “/callback” has been made with payload which as been
deserialized into Self::Data
and session data stored in
CallbackDataAndSession.