Trait ciborium_io::Read

source ·
pub trait Read {
    type Error;

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

A trait indicating a type that can read bytes

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

Required Associated Types§

source

type Error

The error type

Required Methods§

source

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

Reads exactly data.len() bytes or fails

Implementors§

source§

impl<T: Read> Read for T

§

type Error = Error