pub struct BatchReader { /* private fields */ }Expand description
Splits the text into batches of records.
Implementations§
Source§impl BatchReader
impl BatchReader
Sourcepub fn with_limits(self, limits: BatchLimits) -> Self
pub fn with_limits(self, limits: BatchLimits) -> Self
Replaces the batch limits (tests use tiny batches to exercise batch boundaries).
Sourcepub fn records_read(&self) -> u64
pub fn records_read(&self) -> u64
Records read so far.
Sourcepub const fn is_finished(&self) -> bool
pub const fn is_finished(&self) -> bool
true once the end of the input has been reached.
Sourcepub fn source_name(&self) -> String
pub fn source_name(&self) -> String
The input’s display name.
Sourcepub fn read_batch(
&mut self,
batch: &mut RawBatch,
cancel: &AtomicBool,
) -> Result<bool>
pub fn read_batch( &mut self, batch: &mut RawBatch, cancel: &AtomicBool, ) -> Result<bool>
Reads the next batch into batch (cleared first). Returns Ok(false) once the input is
exhausted and every stored byte has been read (so the checksum is complete).
§Errors
Structural FASTA errors (DimaError::InputFormat), I/O errors, corrupt compressed
data, an empty input, or DimaError::Cancelled.
Auto Trait Implementations§
impl !RefUnwindSafe for BatchReader
impl !Sync for BatchReader
impl !UnwindSafe for BatchReader
impl Freeze for BatchReader
impl Send for BatchReader
impl Unpin for BatchReader
impl UnsafeUnpin for BatchReader
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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