Trait std::io::Read [] [src]

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

    fn read_to_end(&mut self, vec: &mut Vec<u8>) -> Result<usize> { ... }
    fn read_to_string(&mut self, string: &mut String) -> Result<usize> { ... }
    fn bytes(&mut self) -> IntoIter<u8> { ... }
}

Types you can read

Required Methods

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

Read a file to a buffer

Provided Methods

fn read_to_end(&mut self, vec: &mut Vec<u8>) -> Result<usize>

Read the file to the end

fn read_to_string(&mut self, string: &mut String) -> Result<usize>

Read the file to a string

fn bytes(&mut self) -> IntoIter<u8>

Return an iterator of the bytes

Implementors