scylla::serialize::raw_batch

Trait RawBatchValuesIterator

Source
pub trait RawBatchValuesIterator<'a> {
    // Required methods
    fn serialize_next(
        &mut self,
        writer: &mut RowWriter<'_>,
    ) -> Option<Result<(), SerializationError>>;
    fn is_empty_next(&mut self) -> Option<bool>;
    fn skip_next(&mut self) -> Option<()>;

    // Provided method
    fn count(self) -> usize
       where Self: Sized { ... }
}
Expand description

An Iterator-like object over the values from the parent RawBatchValues object.

It’s not a true Iterator because it does not provide direct access to the items being iterated over, instead it allows calling methods of the underlying SerializeRow trait while advancing the iterator.

Unlike BatchValuesIterator, it doesn’t need type information for serialization.

Required Methods§

Source

fn serialize_next( &mut self, writer: &mut RowWriter<'_>, ) -> Option<Result<(), SerializationError>>

Serializes the next set of values in the sequence and advances the iterator.

Source

fn is_empty_next(&mut self) -> Option<bool>

Returns whether the next set of values is empty or not and advances the iterator.

Source

fn skip_next(&mut self) -> Option<()>

Skips the next set of values.

Provided Methods§

Source

fn count(self) -> usize
where Self: Sized,

Return the number of sets of values, consuming the iterator in the process.

Implementations on Foreign Types§

Source§

impl<'r> RawBatchValuesIterator<'r> for Iter<'r, SerializedValues>

Source§

fn serialize_next( &mut self, writer: &mut RowWriter<'_>, ) -> Option<Result<(), SerializationError>>

Source§

fn is_empty_next(&mut self) -> Option<bool>

Source§

fn skip_next(&mut self) -> Option<()>

Source§

fn count(self) -> usize

Implementors§

Source§

impl<'bvi, 'ctx, BVI, CTX> RawBatchValuesIterator<'bvi> for RawBatchValuesIteratorAdapter<BVI, CTX>
where BVI: BatchValuesIterator<'bvi>, CTX: Iterator<Item = RowSerializationContext<'ctx>>,