trait ResultSender {
    fn add_result<'life0, 'async_trait>(
        &'life0 mut self,
        res: StatementResult
    ) -> Pin<Box<dyn Future<Output = Result<Result<(), ()>, Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn await_rows<'life0, 'async_trait, F, R>(
        &'life0 mut self,
        f: F
    ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
    where
        F: Future<Output = R> + Send + 'async_trait,
        R: 'async_trait,
        Self: 'async_trait,
        'life0: 'async_trait
; fn allow_subscribe(&self) -> bool; }
Expand description

Trait describing how to transmit a response to a client. HTTP clients accumulate into a Vec and send all at once. WebSocket clients send each message as they occur.

Required Methods§

Adds a result to the client. Returns Err if sending to the client produced an error and the server should disconnect. Returns Ok(Err) if the statement produced an error and should error the transaction, but remain connected. Returns Ok(Ok(())) if the statement succeeded.

Awaits a future while also able to check the status of the client connection. Should return an error if the client connection has gone away.

Reports whether the client supports streaming SUBSCRIBE results.

Implementations on Foreign Types§

Implementors§