Struct nue_io::BufSeeker [] [src]

pub struct BufSeeker<T> {
    // some fields omitted
}

A buffered reader that allows for seeking within the buffer.

Unlike std::io::BufReader, seeking doesn't invalidate the buffer.

Methods

impl<T> BufSeeker<T>

fn new(inner: T) -> Self

Creates a new BufSeeker around the specified Read.

fn with_capacity(cap: usize, inner: T) -> Self

Creates a BufSeeker with a specific buffer size.

fn into_inner(self) -> T

Unwraps the BufSeeker, returning the underlying reader.

Note that any leftover data in the buffer will be lost.

Trait Implementations

impl<T: SeekForward> SeekForward for BufSeeker<T>

fn seek_forward(&mut self, offset: u64) -> Result<u64>

impl<T: SeekBackward> SeekBackward for BufSeeker<T>

fn seek_backward(&mut self, offset: u64) -> Result<u64>

impl<T: SeekRewind> SeekRewind for BufSeeker<T>

fn seek_rewind(&mut self) -> Result<()>

impl<T: Tell> Tell for BufSeeker<T>

fn tell(&mut self) -> Result<u64>

impl<T: SeekAbsolute> SeekAbsolute for BufSeeker<T>

fn seek_absolute(&mut self, pos: u64) -> Result<u64>

impl<T: SeekEnd> SeekEnd for BufSeeker<T>

fn seek_end(&mut self, offset: i64) -> Result<u64>

impl<T: Read> Read for BufSeeker<T>

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

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

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

fn by_ref(&mut self) -> &mut Self

fn bytes(self) -> Bytes<Self>

fn chars(self) -> Chars<Self>

fn chain<R>(self, next: R) -> Chain<Self, R> where R: Read

fn take(self, limit: u64) -> Take<Self>

fn tee<W>(self, out: W) -> Tee<Self, W> where W: Write

impl<T: Read> BufRead for BufSeeker<T>

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

fn consume(&mut self, amt: usize)

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

fn split(self, byte: u8) -> Split<Self>

fn lines(self) -> Lines<Self>