Trait constriction::backends::BoundedReadWords
source · pub trait BoundedReadWords<Word, S: Semantics>: ReadWords<Word, S> {
// Required method
fn remaining(&self) -> usize;
// Provided method
fn is_exhausted(&self) -> bool { ... }
}
Expand description
A trait for data sources that know how much data is left.
Required Methods§
Provided Methods§
sourcefn is_exhausted(&self) -> bool
fn is_exhausted(&self) -> bool
Whether or not there is no data left to read.
You’ll usually want to overwrite the default implementation of
ReadWords::maybe_exhausted
to call is_exhausted
, although the only strict
requirement is that maybe_exhausted
must not return false
if is_exhausted
returns true
.