Trait dusk_bytes::Read[][src]

pub trait Read {
    fn capacity(&self) -> usize;
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>; }

Implementors of the Read trait are called 'readers'.

Readers are defined by one required method, [read()]. Each call to [read()] will attempt to pull bytes from this source into a provided buffer.

Required methods

fn capacity(&self) -> usize[src]

Returns the number of elements the Reader can hold.

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>[src]

Pull some bytes from this source into the specified buffer, returning how many bytes were read.

Loading content...

Implementors

impl Read for &[u8][src]

Loading content...