[][src]Trait btle::hci::stream::HCIWriter

pub trait HCIWriter {
    fn send_bytes<'f>(
        self: Pin<&'f mut Self>,
        bytes: &[u8]
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'f>>; }

Required methods

fn send_bytes<'f>(
    self: Pin<&'f mut Self>,
    bytes: &[u8]
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'f>>

Work around for async in traits. Traits can't return a generic type with a lifetime bound to the function call (like below). But they can return a dynamic type with the lifetime bound to the function call. Sadly, this work around requires boxing the return value which is non-zero overhead.

Loading content...

Implementors

impl<'r, R: AsyncRead + AsyncWrite, Buf: Storage> HCIWriter for ByteRead<'r, R, Buf>[src]

impl<Buf: Storage, S: HCIWriter + HCIReader<Buf> + HCIFilterable> HCIWriter for Stream<S, Buf>[src]

Loading content...