ciborium_io

Trait Write

Source
pub trait Write {
    type Error;

    // Required methods
    fn write_all(&mut self, data: &[u8]) -> Result<(), Self::Error>;
    fn flush(&mut self) -> Result<(), Self::Error>;
}
Expand description

A trait indicating a type that can write bytes

Note that this is similar to std::io::Write, but simplified for use in a no_std context.

Required Associated Types§

Source

type Error

The error type

Required Methods§

Source

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

Writes all bytes from data or fails

Source

fn flush(&mut self) -> Result<(), Self::Error>

Flushes all output

Implementors§

Source§

impl<T: Write> Write for T