Skip to main content

InterimHandler

Trait InterimHandler 

Source
pub trait InterimHandler: Send {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn on_interim_response(
        &mut self,
        response: ResponseMetadata,
        cancellation: &Cancellation,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
Expand description

A protocol writer or client observer for an interim response head.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn on_interim_response( &mut self, response: ResponseMetadata, cancellation: &Cancellation, ) -> impl Future<Output = Result<(), Self::Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<F, Fut, E> InterimHandler for F
where F: FnMut(ResponseMetadata) -> Fut + Send, Fut: Future<Output = Result<(), E>> + Send, E: Error + Send + Sync + 'static,

Source§

type Error = E