[][src]Struct capnp_futures::Sender

pub struct Sender<M> where
    M: AsOutputSegments
{ /* fields omitted */ }

A handle that allows message to be sent to a WriteQueue.


impl<M> Sender<M> where
    M: AsOutputSegments + 'static, 

pub fn send(&mut self, message: M) -> Box<dyn Future<Item = M, Error = Error>>[src]

Enqueues a message to be written.

pub fn len(&mut self) -> usize[src]

Returns the number of messages queued to be written, not including any in-progress write.

pub fn terminate(
    &mut self,
    result: Result<(), Error>
) -> Box<dyn Future<Item = (), Error = Error>>

Commands the queue to stop writing messages once it is empty. After this method has been called, any new calls to send() will return a future that immediately resolves to an error. If the passed-in result is an error, then the WriteQueue will resolve to that error.

Trait Implementations

impl<M> Drop for Sender<M> where
    M: AsOutputSegments

impl<M> Clone for Sender<M> where
    M: AsOutputSegments

Auto Trait Implementations

impl<M> !Send for Sender<M>

impl<M> Unpin for Sender<M>

impl<M> !Sync for Sender<M>

impl<M> !UnwindSafe for Sender<M>

impl<M> !RefUnwindSafe for Sender<M>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

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