pub trait RecordReader {
// Required methods
fn next(&mut self) -> Result<Option<StoredRecord<'_>>>;
fn continuation(&self) -> u64;
// Provided method
fn next_owned(&mut self) -> Result<Option<OwnedStoredRecord>> { ... }
}Expand description
The object-safe pull interface over any record reader. next lends a
record borrowing the reader’s internal buffer; callers that need to
hold records across calls use next_owned.
Required Methods§
Sourcefn next(&mut self) -> Result<Option<StoredRecord<'_>>>
fn next(&mut self) -> Result<Option<StoredRecord<'_>>>
Yields the next matching record, borrowing the reader’s internal
buffer, or None at the end of the plan.
Sourcefn continuation(&self) -> u64
fn continuation(&self) -> u64
The resumable continuation: the first position this reader has not
yet yielded or skipped past. Feeding it back as from in a new
plan resumes without gaps or duplicates.
Provided Methods§
Sourcefn next_owned(&mut self) -> Result<Option<OwnedStoredRecord>>
fn next_owned(&mut self) -> Result<Option<OwnedStoredRecord>>
Like next but returns an owned record, copying the
payload out of the buffer so it can be held across calls.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".