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

pub trait HCIReader<Buf: Storage> {
    fn read_event<'f>(
        self: Pin<&'f mut Self>
    ) -> Pin<Box<dyn Future<Output = Option<Result<EventPacket<Buf>, Error>>> + 'f>>; }

Required methods

fn read_event<'f>(
    self: Pin<&'f mut Self>
) -> Pin<Box<dyn Future<Output = Option<Result<EventPacket<Buf>, 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, Buf: Storage> HCIReader<Buf> for ByteRead<'r, R, Buf>[src]

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

Loading content...