scylla_cql::frame::value

Struct LegacyBatchValuesFirstSerialized

Source
pub struct LegacyBatchValuesFirstSerialized<'f, T> { /* private fields */ }
Expand description

Allows reusing already-serialized first value

We’ll need to build a LegacySerializedValues for the first ~ValueList of a batch to figure out the shard (#448). Once that is done, we can use that instead of re-serializing.

This struct implements both BatchValues and BatchValuesIterator for that purpose

Implementations§

Source§

impl<'f, T: LegacyBatchValues> LegacyBatchValuesFirstSerialized<'f, T>

Source

pub fn new( batch_values: T, already_serialized_first: Option<&'f LegacySerializedValues>, ) -> Self

Trait Implementations§

Source§

impl<'f, BV: LegacyBatchValues> LegacyBatchValues for LegacyBatchValuesFirstSerialized<'f, BV>

Source§

type LegacyBatchValuesIter<'r> = LegacyBatchValuesFirstSerialized<'f, <BV as LegacyBatchValues>::LegacyBatchValuesIter<'r>> where Self: 'r

For some unknown reason, this type, when not resolved to a concrete type for a given async function, cannot live across await boundaries while maintaining the corresponding future Send, unless 'r: 'static Read more
Source§

fn batch_values_iter(&self) -> Self::LegacyBatchValuesIter<'_>

Source§

impl<'a, 'f: 'a, IT: LegacyBatchValuesIterator<'a>> LegacyBatchValuesIterator<'a> for LegacyBatchValuesFirstSerialized<'f, IT>

Source§

fn next_serialized(&mut self) -> Option<SerializedResult<'a>>

Source§

fn write_next_to_request( &mut self, buf: &mut impl BufMut, ) -> Option<Result<(), SerializeValuesError>>

Source§

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

Source§

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

Auto Trait Implementations§

§

impl<'f, T> Freeze for LegacyBatchValuesFirstSerialized<'f, T>
where T: Freeze,

§

impl<'f, T> RefUnwindSafe for LegacyBatchValuesFirstSerialized<'f, T>
where T: RefUnwindSafe,

§

impl<'f, T> Send for LegacyBatchValuesFirstSerialized<'f, T>
where T: Send,

§

impl<'f, T> Sync for LegacyBatchValuesFirstSerialized<'f, T>
where T: Sync,

§

impl<'f, T> Unpin for LegacyBatchValuesFirstSerialized<'f, T>
where T: Unpin,

§

impl<'f, T> UnwindSafe for LegacyBatchValuesFirstSerialized<'f, T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V