Struct scylla_cql::types::deserialize::result::RawRowLendingIterator
source · pub struct RawRowLendingIterator { /* private fields */ }
Expand description
A lending iterator over serialized rows.
This type is similar to RawRowIterator
, but keeps ownership of the serialized
result. Because it returns ColumnIterator
s that need to borrow from it,
it does not implement the Iterator
trait (there is no type in the standard
library to represent this concept yet).
Implementations§
source§impl RawRowLendingIterator
impl RawRowLendingIterator
sourcepub fn new(raw_rows: DeserializedMetadataAndRawRows) -> Self
pub fn new(raw_rows: DeserializedMetadataAndRawRows) -> Self
Creates a new RawRowLendingIterator
, consuming given RawRows
.
sourcepub fn next(
&mut self,
) -> Option<Result<ColumnIterator<'_, '_>, DeserializationError>>
pub fn next( &mut self, ) -> Option<Result<ColumnIterator<'_, '_>, DeserializationError>>
Returns a ColumnIterator
that represents the next row.
Note: the ColumnIterator
borrows from the RawRowLendingIterator
.
The column iterator must be consumed before the rows iterator can
continue.
pub fn size_hint(&self) -> (usize, Option<usize>)
sourcepub fn metadata(&self) -> &ResultMetadata<'_>
pub fn metadata(&self) -> &ResultMetadata<'_>
Returns the metadata associated with the response (paging state and column specifications).
sourcepub fn rows_remaining(&self) -> usize
pub fn rows_remaining(&self) -> usize
Returns the remaining number of rows that this iterator is expected to produce.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RawRowLendingIterator
impl RefUnwindSafe for RawRowLendingIterator
impl Send for RawRowLendingIterator
impl Sync for RawRowLendingIterator
impl Unpin for RawRowLendingIterator
impl UnwindSafe for RawRowLendingIterator
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