[][src]Struct future_bus::BusSubscriber

pub struct BusSubscriber<T, S, R> where
    T: Send + Clone + 'static,
    S: Sink<T> + Unpin,
    R: Stream<Item = T> + Unpin
{ /* fields omitted */ }

A receiver of data from a FutureBus. When it is dropped, the sender is removed from the bus. Note that this means dropping a receiver causes a write access to the bus, so it causes a lock.

Methods

impl<T, S, R> BusSubscriber<T, S, R> where
    T: Send + Clone + 'static,
    S: Sink<T> + Unpin,
    R: Stream<Item = T> + Unpin
[src]

pub fn try_clone(&self) -> Option<Self>[src]

Attempts to create a new subscriber. Returns None if the underlying bus has since been dropped.

Trait Implementations

impl<T, S, R> Drop for BusSubscriber<T, S, R> where
    T: Send + Clone + 'static,
    S: Sink<T> + Unpin,
    R: Stream<Item = T> + Unpin
[src]

impl<T, S, R> FusedStream for BusSubscriber<T, S, R> where
    T: Send + Clone + 'static,
    S: Sink<T> + Unpin,
    R: Stream<Item = T> + Unpin
[src]

impl<T, S, R> Stream for BusSubscriber<T, S, R> where
    T: Send + Clone + 'static,
    S: Sink<T> + Unpin,
    R: Stream<Item = T> + Unpin
[src]

type Item = R::Item

Values yielded by the stream.

Auto Trait Implementations

impl<T, S, R> Send for BusSubscriber<T, S, R> where
    R: Send,
    S: Send + Sync

impl<T, S, R> Sync for BusSubscriber<T, S, R> where
    R: Sync,
    S: Send + Sync

impl<T, S, R> Unpin for BusSubscriber<T, S, R>

impl<T, S, R> !UnwindSafe for BusSubscriber<T, S, R>

impl<T, S, R> !RefUnwindSafe for BusSubscriber<T, S, R>

Blanket Implementations

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

impl<T> From<T> for 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<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