pub trait ResponseSink: Send {
// Required methods
fn head<'life0, 'life1, 'async_trait>(
&'life0 mut self,
status: u16,
content_type: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), ProxyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn chunk<'life0, 'life1, 'async_trait>(
&'life0 mut self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), ProxyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Receives a response as it is produced (so a streamed completion is relayed as it arrives, not buffered).
Required Methods§
Sourcefn head<'life0, 'life1, 'async_trait>(
&'life0 mut self,
status: u16,
content_type: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 mut self,
status: u16,
content_type: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<(), ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The status line and content type. Called once, first.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".