Skip to main content

CotpWriter

Trait CotpWriter 

Source
pub trait CotpWriter: Send {
    // Required method
    fn send(
        &mut self,
        input: &mut VecDeque<Vec<u8>>,
    ) -> impl Future<Output = Result<(), CotpError>> + Send;
}

Required Methods§

Source

fn send( &mut self, input: &mut VecDeque<Vec<u8>>, ) -> impl Future<Output = Result<(), CotpError>> + Send

Writes to a COTP connection. This uses a VedDeque as a buffer. This is to ensure the operation is cancel safe so long as the buffer is not dropped while it has data.

This operation is cancel safe as long as the data in the input buffer is not dropped. The Veque is intended to be used as a FIFO buffer stored on the caller and reused.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§