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> LegacyBatchValuesFirstSerialized<'f, T>where
T: LegacyBatchValues,
impl<'f, T> LegacyBatchValuesFirstSerialized<'f, T>where
T: LegacyBatchValues,
pub fn new( batch_values: T, already_serialized_first: Option<&'f LegacySerializedValues>, ) -> LegacyBatchValuesFirstSerialized<'f, T>
Trait Implementations§
Source§impl<'f, BV> LegacyBatchValues for LegacyBatchValuesFirstSerialized<'f, BV>where
BV: LegacyBatchValues,
impl<'f, BV> LegacyBatchValues for LegacyBatchValuesFirstSerialized<'f, BV>where
BV: LegacyBatchValues,
Source§type LegacyBatchValuesIter<'r> = LegacyBatchValuesFirstSerialized<'f, <BV as LegacyBatchValues>::LegacyBatchValuesIter<'r>>
where
LegacyBatchValuesFirstSerialized<'f, BV>: 'r
type LegacyBatchValuesIter<'r> = LegacyBatchValuesFirstSerialized<'f, <BV as LegacyBatchValues>::LegacyBatchValuesIter<'r>> where LegacyBatchValuesFirstSerialized<'f, BV>: '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 morefn batch_values_iter( &self, ) -> <LegacyBatchValuesFirstSerialized<'f, BV> as LegacyBatchValues>::LegacyBatchValuesIter<'_>
Source§impl<'a, 'f, IT> LegacyBatchValuesIterator<'a> for LegacyBatchValuesFirstSerialized<'f, IT>where
'f: 'a,
IT: LegacyBatchValuesIterator<'a>,
impl<'a, 'f, IT> LegacyBatchValuesIterator<'a> for LegacyBatchValuesFirstSerialized<'f, IT>where
'f: 'a,
IT: LegacyBatchValuesIterator<'a>,
fn next_serialized( &mut self, ) -> Option<Result<Cow<'a, LegacySerializedValues>, SerializeValuesError>>
fn write_next_to_request( &mut self, buf: &mut impl BufMut, ) -> Option<Result<(), SerializeValuesError>>
fn skip_next(&mut self) -> Option<()>
fn count(self) -> usizewhere
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> 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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