[][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.

Methods

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

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>>
[src]

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
[src]

impl<M> Clone for Sender<M> where
    M: AsOutputSegments
[src]

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
[src]

type Owned = T

The resulting type after obtaining ownership.

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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