[][src]Struct cb_fut::CBStreamBlocked

pub struct CBStreamBlocked<R, T> where
    R: 'static + Clone
{ /* fields omitted */ }

An object that represent callback function arguments. It implement futures::Stream trait and return value to the function by using CBBlockResult.

It can be obtain by using macro stream_blocked. See stream_blocked for example usage.

This struct shall be semi-transparent to user.

Implementations

impl<R, T> CBStreamBlocked<R, T> where
    R: 'static + Clone
[src]

pub fn new(
    return_sender: Sender<R>,
    reciever: UnboundedReceiver<T>,
    default_ret_val: R
) -> CBStreamBlocked<R, T> where
    R: 'static + Clone
[src]

You will likely use this macro stream_blocked instead of trying to construct this struct using this method.

It require channel to communicate back and forth between the function and this struct.

Auto Trait Implementations

impl<R, T> !RefUnwindSafe for CBStreamBlocked<R, T>

impl<R, T> Send for CBStreamBlocked<R, T> where
    R: Send,
    T: Send

impl<R, T> !Sync for CBStreamBlocked<R, T>

impl<R, T> Unpin for CBStreamBlocked<R, T> where
    R: Unpin

impl<R, T> !UnwindSafe for CBStreamBlocked<R, T>

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, 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.