[][src]Struct btle::hci::stream::byte_stream::ByteRead

pub struct ByteRead<'r, R: AsyncRead, Buf: Storage> { /* fields omitted */ }

HCI Byte Stream Reader. Implements HCIReader for async byte streams (futures_io::AsyncRead). If the stream is writable (futures_io::AsyncWrite), HCIWriter will be implemented for it. Look at ByteWrite

Methods

impl<'r, R: AsyncRead, Buf: Storage> ByteRead<'r, R, Buf>[src]

pub fn new(reader: Pin<&'r mut R>) -> Self[src]

Wraps a raw byte stream into a HCI byte stream.

pub fn clear(self: Pin<&mut Self>)[src]

Clear the Read state from the ByteStream. If any message is in the process of being received, it will lose all that data.

Trait Implementations

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

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

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

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

type Item = Result<EventPacket<Buf>, Error>

Values yielded by the stream.

Auto Trait Implementations

impl<'r, R, Buf> RefUnwindSafe for ByteRead<'r, R, Buf> where
    Buf: RefUnwindSafe,
    R: RefUnwindSafe

impl<'r, R, Buf> Send for ByteRead<'r, R, Buf> where
    Buf: Send,
    R: Send

impl<'r, R, Buf> Sync for ByteRead<'r, R, Buf> where
    Buf: Sync,
    R: Sync

impl<'r, R, Buf> Unpin for ByteRead<'r, R, Buf> where
    Buf: Unpin

impl<'r, R, Buf> !UnwindSafe for ByteRead<'r, R, Buf>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]