pub enum ReadStatus {
Done,
NotDone,
}
Expand description
A read status.
Variants§
Done
The operation did not read any data from the underlying reader, and reading has finished.
NotDone
The operation read data from the underlying reader, and reading may not be finished.
Implementations§
Source§impl ReadStatus
impl ReadStatus
Sourcepub fn check<R>(reader: &mut R) -> Result<ReadStatus, Error>where
R: BufRead,
pub fn check<R>(reader: &mut R) -> Result<ReadStatus, Error>where
R: BufRead,
Returns the read status of a reader.
§Returns
Returns ReadStatus::Done
if no more data remains to be read in the
reader, otherwise returns ReadStatus::NotDone
if any data remains.
The reader may attempt to fill the underlying buffer to check for more
data. An error in this processed is returned.
Sourcepub fn is_done(&self) -> bool
pub fn is_done(&self) -> bool
Returns true
if read status is ReadStatus::Done
.
Sourcepub fn is_not_done(&self) -> bool
pub fn is_not_done(&self) -> bool
Returns true
if read status is ReadStatus::NotDone
.
Trait Implementations§
Source§impl Clone for ReadStatus
impl Clone for ReadStatus
Source§fn clone(&self) -> ReadStatus
fn clone(&self) -> ReadStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReadStatus
impl Debug for ReadStatus
Source§impl PartialEq for ReadStatus
impl PartialEq for ReadStatus
impl Copy for ReadStatus
impl Eq for ReadStatus
impl StructuralPartialEq for ReadStatus
Auto Trait Implementations§
impl Freeze for ReadStatus
impl RefUnwindSafe for ReadStatus
impl Send for ReadStatus
impl Sync for ReadStatus
impl Unpin for ReadStatus
impl UnwindSafe for ReadStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more