Trait ResponseStream

Source
pub trait ResponseStream {
    // Required methods
    fn send<'life0, 'async_trait>(
        &'life0 self,
        response: Response,
    ) -> Pin<Box<dyn Future<Output = Result<(), ResponseError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn try_send(&self, response: Response) -> Result<(), Box<TryResponseError>>;
    fn is_closed(&self) -> bool;
}

Required Methods§

Source

fn send<'life0, 'async_trait>( &'life0 self, response: Response, ) -> Pin<Box<dyn Future<Output = Result<(), ResponseError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a response to the query. Should fail if the query is closed.

Source

fn try_send(&self, response: Response) -> Result<(), Box<TryResponseError>>

Try to send a response to the query. Should fail if the query is closed, or if this stream cannot currently accept a response.

Source

fn is_closed(&self) -> bool

Return true if the query is closed.

Implementors§