Trait bytecodec::io::IoEncodeExt [−][src]
pub trait IoEncodeExt: Encode { fn encode_to_write_buf<B>(&mut self, buf: &mut WriteBuf<B>) -> Result<()>
where
B: AsMut<[u8]>, { ... } fn encode_all<W: Write>(&mut self, writer: W) -> Result<()> { ... } }
An extension of Encode
trait to aid encodings involving I/O.
Provided Methods
fn encode_to_write_buf<B>(&mut self, buf: &mut WriteBuf<B>) -> Result<()> where
B: AsMut<[u8]>,
B: AsMut<[u8]>,
Encodes the items remaining in the encoder and writes the encoded bytes to the given write buffer.
fn encode_all<W: Write>(&mut self, writer: W) -> Result<()>
Encodes all of the items remaining in the encoder and writes the encoded bytes to the given writer.
Note that this is a blocking method.
Implementors
impl<T: Encode> IoEncodeExt for T