Trait sop::ReadyWithResult[][src]

pub trait ReadyWithResult<T> {
    fn write_to(
        self: Box<Self>,
        sink: &mut (dyn Write + Send + Sync)
    ) -> Result<T>; fn to_vec(self: Box<Self>) -> Result<(T, Vec<u8>)> { ... } }
Expand description

An operation that returns a value ready to be executed.

To execute the operation, either supply an std::io::Writer using Ready::write_to to write the resulting data to, or use Ready::to_vec to write to a Vec<u8>.

Required methods

fn write_to(self: Box<Self>, sink: &mut (dyn Write + Send + Sync)) -> Result<T>[src]

Executes the operation writing the result to sink.

Provided methods

fn to_vec(self: Box<Self>) -> Result<(T, Vec<u8>)>[src]

Executes the operation writing the result into a Vec<u8>.

Implementors