Trait sop::ReadyWithResult
source · [−]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::Write
r
using Ready::write_to
to write the resulting data to, or use
Ready::to_vec
to write to a Vec<u8>
.