Skip to main content

EncodeSink

Trait EncodeSink 

Source
pub trait EncodeSink {
    // Required method
    fn write_all(&mut self, bytes: &[u8]) -> Result<(), CodecError>;
}
Expand description

Destination for canonical encoded bytes.

Required Methods§

Source

fn write_all(&mut self, bytes: &[u8]) -> Result<(), CodecError>

Writes all bytes to the sink or returns an error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl EncodeSink for Vec<u8>

Available on crate feature alloc only.
Source§

fn write_all(&mut self, bytes: &[u8]) -> Result<(), CodecError>

Source§

impl<T: Write> EncodeSink for BufWriter<T>

Available on crate feature std only.
Source§

fn write_all(&mut self, bytes: &[u8]) -> Result<(), CodecError>

Implementors§