pub trait LegacyBatchValuesIterator<'a> {
// Required methods
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<()>;
// Provided method
fn count(self) -> usize
where Self: Sized { ... }
}
Expand description
An iterator-like for ValueList
An instance of this can be easily obtained from IT: Iterator<Item: ValueList>
: that would be
BatchValuesIteratorFromIterator<IT>
It’s just essentially making methods from ValueList
accessible instead of being an actual iterator because of
compiler limitations that would otherwise be very complex to overcome.
(specifically, types being different would require yielding enums for tuple impls)
Required Methods§
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<()>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.