[][src]Struct multiqueue2::BroadcastFutUniReceiver

pub struct BroadcastFutUniReceiver<R, F: FnMut(&T) -> R, T: Clone + Sync> { /* fields omitted */ }

This is the futures-compatible version of BroadcastUniReceiver It implements Stream and behaves like the iterator would. To use a different function must transform itself into a different BroadcastFutUniRecveiver use transform_operation

Implementations

impl<R, F: FnMut(&T) -> R, T: Clone + Sync> BroadcastFutUniReceiver<R, F, T>[src]

pub fn try_recv(&mut self) -> Result<R, TryRecvError>[src]

Equivalent to BroadcastReceiver::try_recv using the held operation

pub fn recv(&mut self) -> Result<R, RecvError>[src]

Equivalent to BroadcastReceiver::recv using the held operation

pub fn add_stream_with<RQ, FQ: FnMut(&T) -> RQ>(
    &self,
    op: FQ
) -> BroadcastFutUniReceiver<RQ, FQ, T>
[src]

Adds a stream with the specified method

pub fn transform_operation<RQ, FQ: FnMut(&T) -> RQ>(
    self,
    op: FQ
) -> BroadcastFutUniReceiver<RQ, FQ, T>
[src]

Returns a new receiver on the same stream using a different method

pub fn unsubscribe(self) -> bool[src]

Identical to BroadcastReceiver::unsubscribe

pub fn into_multi(self) -> BroadcastFutReceiver<T>[src]

Transforms this back into BroadcastFutReceiver, returning the new receiver

Trait Implementations

impl<R, F: FnMut(&T) -> R, T: Clone + Sync> Stream for BroadcastFutUniReceiver<R, F, T>[src]

type Item = R

The type of item this stream will yield on success.

type Error = ()

The type of error this stream may generate.

Auto Trait Implementations

impl<R, F, T> !RefUnwindSafe for BroadcastFutUniReceiver<R, F, T>[src]

impl<R, F, T> Send for BroadcastFutUniReceiver<R, F, T>[src]

impl<R, F, T> !Sync for BroadcastFutUniReceiver<R, F, T>[src]

impl<R, F, T> Unpin for BroadcastFutUniReceiver<R, F, T> where
    F: Unpin
[src]

impl<R, F, T> !UnwindSafe for BroadcastFutUniReceiver<R, F, T>[src]

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

type Init = T

The type for initializers.

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.