[][src]Struct seq_io::core::BufReader

pub struct BufReader<R, P = StdPolicy> where
    R: Read
{ /* fields omitted */ }

Wraps buf_redux::BufReader, managing buffer growth based on BufPolicy and the relocation of buffer contents with make_room(). Does not implement std::io::BufRead

Implementations

impl<P> BufReader<File, P> where
    P: BufPolicy
[src]

pub fn from_path<F: AsRef<Path>>(path: F) -> Result<BufReader<File>>[src]

Creates a buffered reader from a file path.

impl<R> BufReader<R> where
    R: Read
[src]

pub fn new(reader: R) -> Self[src]

pub fn with_capacity(reader: R, capacity: usize) -> Self[src]

impl<R, P> BufReader<R, P> where
    R: Read,
    P: BufPolicy
[src]

pub fn policy(&self) -> &P[src]

pub fn set_policy<T: BufPolicy>(self, buf_policy: T) -> BufReader<R, T>[src]

pub fn buffer(&self) -> &[u8][src]

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

pub fn file_offset(&self) -> u64[src]

pub fn grow(&mut self) -> bool[src]

pub fn make_room(&mut self, offset: usize)[src]

pub fn fill_buf(&mut self) -> Result<usize>[src]

Makes sure the buffer is full after this call (unless EOF reached) code adapted from io::Read::read_exact

impl<R, P> BufReader<R, P> where
    R: Read + Seek,
    P: BufPolicy
[src]

pub fn seek_to(&mut self, pos: u64) -> Result<()>[src]

Auto Trait Implementations

impl<R, P> RefUnwindSafe for BufReader<R, P> where
    P: RefUnwindSafe,
    R: RefUnwindSafe

impl<R, P> Send for BufReader<R, P> where
    P: Send,
    R: Send

impl<R, P> Sync for BufReader<R, P> where
    P: Sync,
    R: Sync

impl<R, P> Unpin for BufReader<R, P> where
    P: Unpin,
    R: Unpin

impl<R, P> UnwindSafe for BufReader<R, P> where
    P: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.