Trait ciborium_io::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

§

type Error = Error