Skip to main content

BufRead

Trait BufRead 

Source
pub trait BufRead: Read {
    // Required methods
    fn fill_buf(&mut self) -> Result<&[u8]>;
    fn consume(&mut self, amt: usize);
}

Required Methods§

Source

fn fill_buf(&mut self) -> Result<&[u8]>

Source

fn consume(&mut self, amt: usize)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<R: BufRead + ?Sized> BufRead for &mut R

Source§

fn fill_buf(&mut self) -> Result<&[u8]>

Source§

fn consume(&mut self, amt: usize)

Implementors§

Source§

impl<R: BufRead> BufRead for Take<R>

Source§

impl<T: AsRef<[u8]>> BufRead for Cursor<T>