Struct capnp_futures::Sender
[−]
[src]
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]
fn send(&mut self, message: M) -> Box<Future<Item=M, Error=Error>>
Enqueues a message to be written.
fn len(&mut self) -> usize
Returns the number of messages queued to be written, not including any in-progress write.
fn terminate(&mut self,
result: Result<(), Error>)
-> Box<Future<Item=(), Error=Error>>
result: Result<(), Error>)
-> Box<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> Clone for Sender<M> where M: AsOutputSegments
[src]
fn clone(&self) -> Sender<M>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more