[][src]Struct tokio_bus::BusReader

pub struct BusReader<T: Clone + Sync> { /* fields omitted */ }

The BusReader should not be manually crated, but rather crated by calling add_rx() on a Bus.

A Bus and BusReader are both safe to drop at any time, any messages not read by the BusReader will not be lost if the Bus is dropped first, and if the BusReader is dropped first it will not block the Bus's buffer.

Methods

impl<T: Clone + Sync> BusReader<T>[src]

pub fn new(
    inner: BusReader<T>,
    read_task: Arc<AtomicTask>,
    write_task: Arc<AtomicTask>
) -> Self
[src]

Create a new BusReader from a bus::BusReader, a handle to a task to register for writes to the Bus and a handle to a task to notify when a read has potentially caused buffer space in the Bus to become available.

Trait Implementations

impl<T: Clone + Sync> Drop for BusReader<T>[src]

fn drop(&mut self)[src]

This reader dropping may allow some buffer space to become free, so a write may succeed afterward.

impl<T: Clone + Sync> Stream for BusReader<T>[src]

type Item = T

The type of item this stream will yield on success.

type Error = RecvError

The type of error this stream may generate.

Auto Trait Implementations

impl<T> Unpin for BusReader<T>

impl<T> Sync for BusReader<T> where
    T: Send

impl<T> Send for BusReader<T> where
    T: Send

impl<T> !RefUnwindSafe for BusReader<T>

impl<T> !UnwindSafe for BusReader<T>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

impl<T> Erased for T