Input

Trait Input 

Source
pub trait Input {
    // Required method
    fn read(&mut self, into: &mut [u8]) -> usize;

    // Provided method
    fn read_byte(&mut self) -> Option<u8> { ... }
}
Expand description

Trait that allows reading of data into a slice.

Required Methods§

Source

fn read(&mut self, into: &mut [u8]) -> usize

Read into the provided input slice. Returns the number of bytes read.

Provided Methods§

Source

fn read_byte(&mut self) -> Option<u8>

Read a single byte from the input.

Implementors§

Source§

impl<R: Read> Input for R

Available on crate feature std only.