IoWrite

Trait IoWrite 

Source
pub trait IoWrite {
    type Error: Error;

    // Required method
    fn write(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
}
Expand description

Minimal Write‑like trait used by encoders to avoid committing to a specific I/O model.

Required Associated Types§

Source

type Error: Error

Error type produced by the writer.

Required Methods§

Source

fn write(&mut self, buf: &[u8]) -> Result<(), Self::Error>

Write all bytes from buf.

Implementors§

Source§

impl IoWrite for SliceWriter<'_>

Source§

impl IoWrite for VecRefWriter<'_>

Available on crate feature alloc only.
Source§

impl IoWrite for VecWriter

Available on crate feature alloc only.
Source§

impl<W> IoWrite for W
where W: Write,

Available on crate feature std only.