Trait CallbackHandler

Source
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§

Source

type Data

The type of the callback-provided data.

Required Methods§

Source

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.

Implementors§