[][src]Struct capnp_futures::Sender

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

A handle that allows message to be sent to a write queue`.

Implementations

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

pub fn send(
    &mut self,
    message: M
) -> impl Future<Output = Result<M, Error>> + Unpin
[src]

Enqueues a message to be written. The returned future resolves once the write has completed.

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>
) -> impl Future<Output = Result<(), Error>> + Unpin
[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> Clone for Sender<M> where
    M: AsOutputSegments
[src]

Auto Trait Implementations

impl<M> !RefUnwindSafe for Sender<M>[src]

impl<M> Send for Sender<M> where
    M: Send
[src]

impl<M> Sync for Sender<M> where
    M: Send
[src]

impl<M> Unpin for Sender<M>[src]

impl<M> !UnwindSafe for Sender<M>[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,