[][src]Struct async_stm32f1xx::serial::RxStream

#[must_use = "streams do nothing unless polled"]pub struct RxStream<BUF, PAYLOAD> where
    BUF: 'static, 
{ /* fields omitted */ }

A Stream-based asynchronous abstraction over a DMA receiver.

Examples

let mut tx_sink = TxSink3::new(tx_buf, tx.with_dma(channels.2));
let mut rx_stream = RxStream3::new(rx_buf, rx.with_dma(channels.3));
// Echoes USART3, by sending all items from the infinite RxStream
tx_sink.send_all(&mut rx_stream).await?;
unreachable!("rx_stream is empty");

Implementations

impl<BUF> RxStream<BUF, RxDma<Rx<USART1>, C5>>[src]

pub fn new(buf: &'static mut [BUF; 2], rx: RxDma1) -> Self where
    BUF: AsMutSlice<Element = u8>, 
[src]

Creates a new RxStream from the specified buffers and DMA transmitter.

pub fn release(self) -> (&'static mut [BUF; 2], RxDma1)[src]

Releases the buffers and DMA transmitter.

impl<BUF> RxStream<BUF, RxDma<Rx<USART2>, C6>>[src]

pub fn new(buf: &'static mut [BUF; 2], rx: RxDma2) -> Self where
    BUF: AsMutSlice<Element = u8>, 
[src]

Creates a new RxStream from the specified buffers and DMA transmitter.

pub fn release(self) -> (&'static mut [BUF; 2], RxDma2)[src]

Releases the buffers and DMA transmitter.

impl<BUF> RxStream<BUF, RxDma<Rx<USART3>, C3>>[src]

pub fn new(buf: &'static mut [BUF; 2], rx: RxDma3) -> Self where
    BUF: AsMutSlice<Element = u8>, 
[src]

Creates a new RxStream from the specified buffers and DMA transmitter.

pub fn release(self) -> (&'static mut [BUF; 2], RxDma3)[src]

Releases the buffers and DMA transmitter.

Auto Trait Implementations

impl<BUF, PAYLOAD> Send for RxStream<BUF, PAYLOAD> where
    BUF: Send,
    PAYLOAD: Send

impl<BUF, PAYLOAD> Sync for RxStream<BUF, PAYLOAD> where
    BUF: Sync,
    PAYLOAD: Sync

impl<BUF, PAYLOAD> Unpin for RxStream<BUF, PAYLOAD> where
    PAYLOAD: Unpin

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> Same<T> for T

type Output = T

Should always be Self

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]