[−][src]Struct buf_redux::Unbuffer
A Read
adapter for a consumed BufReader
which will empty bytes from the buffer before
reading from R
directly. Frees the buffer when it has been emptied.
Methods
impl<R> Unbuffer<R>
[src][−]
pub fn is_buf_empty(&self) -> bool
[src][−]
Returns true
if the buffer still has some bytes left, false
otherwise.
pub fn buf_len(&self) -> usize
[src][−]
Returns the number of bytes remaining in the buffer.
pub fn buf(&self) -> &[u8]
[src][−]
Get a slice over the available bytes in the buffer.
pub fn into_inner(self) -> R
[src][−]
Return the underlying reader, releasing the buffer.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for Unbuffer<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for Unbuffer<R> where
R: Send,
R: Send,
impl<R> Sync for Unbuffer<R> where
R: Sync,
R: Sync,
impl<R> Unpin for Unbuffer<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for Unbuffer<R> where
R: 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,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,