[−][src]Struct seq_io::core::BufReader
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]
P: BufPolicy,
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]
R: Read,
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]
R: Read,
P: BufPolicy,
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]
R: Read + Seek,
P: BufPolicy,
Auto Trait Implementations
impl<R, P> RefUnwindSafe for BufReader<R, P> where
P: RefUnwindSafe,
R: RefUnwindSafe,
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, P> Send for BufReader<R, P> where
P: Send,
R: Send,
P: Send,
R: Send,
impl<R, P> Sync for BufReader<R, P> where
P: Sync,
R: Sync,
P: Sync,
R: Sync,
impl<R, P> Unpin for BufReader<R, P> where
P: Unpin,
R: Unpin,
P: Unpin,
R: Unpin,
impl<R, P> UnwindSafe for BufReader<R, P> where
P: UnwindSafe,
R: UnwindSafe,
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
const ALIGN: usize
type Init = T
The type for initializers.
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,