pub struct LegacySerializedValues { /* private fields */ }
Expand description
Keeps a buffer with serialized Values Allows adding new Values and iterating over serialized ones
Implementations§
Source§impl LegacySerializedValues
impl LegacySerializedValues
Sourcepub const EMPTY: &'static LegacySerializedValues
pub const EMPTY: &'static LegacySerializedValues
A const empty instance, useful for taking references
Sourcepub const fn new() -> LegacySerializedValues
pub const fn new() -> LegacySerializedValues
Creates empty value list
pub fn with_capacity(capacity: usize) -> LegacySerializedValues
pub fn has_names(&self) -> bool
Sourcepub fn add_value(
&mut self,
val: &impl Value,
) -> Result<(), SerializeValuesError>
pub fn add_value( &mut self, val: &impl Value, ) -> Result<(), SerializeValuesError>
Serializes value and appends it to the list
pub fn add_named_value( &mut self, name: &str, val: &impl Value, ) -> Result<(), SerializeValuesError>
pub fn iter(&self) -> impl Iterator<Item = RawValue<'_>>
pub fn write_to_request(&self, buf: &mut impl BufMut)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> u16
pub fn size(&self) -> usize
Sourcepub fn new_from_frame(
buf: &mut &[u8],
contains_names: bool,
) -> Result<LegacySerializedValues, ParseError>
pub fn new_from_frame( buf: &mut &[u8], contains_names: bool, ) -> Result<LegacySerializedValues, ParseError>
Creates value list from the request frame
pub fn iter_name_value_pairs( &self, ) -> impl Iterator<Item = (Option<&str>, RawValue<'_>)>
Trait Implementations§
Source§impl Clone for LegacySerializedValues
impl Clone for LegacySerializedValues
Source§fn clone(&self) -> LegacySerializedValues
fn clone(&self) -> LegacySerializedValues
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LegacySerializedValues
impl Debug for LegacySerializedValues
Source§impl Ord for LegacySerializedValues
impl Ord for LegacySerializedValues
Source§fn cmp(&self, other: &LegacySerializedValues) -> Ordering
fn cmp(&self, other: &LegacySerializedValues) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LegacySerializedValues
impl PartialEq for LegacySerializedValues
Source§impl PartialOrd for LegacySerializedValues
impl PartialOrd for LegacySerializedValues
Source§impl SerializeRow for LegacySerializedValues
impl SerializeRow for LegacySerializedValues
Source§fn serialize(
&self,
ctx: &RowSerializationContext<'_>,
writer: &mut RowWriter<'_>,
) -> Result<(), SerializationError>
fn serialize( &self, ctx: &RowSerializationContext<'_>, writer: &mut RowWriter<'_>, ) -> Result<(), SerializationError>
Serializes the row according to the information in the given context. Read more
Source§impl ValueList for LegacySerializedValues
impl ValueList for LegacySerializedValues
Source§fn serialized(
&self,
) -> Result<Cow<'_, LegacySerializedValues>, SerializeValuesError>
fn serialized( &self, ) -> Result<Cow<'_, LegacySerializedValues>, SerializeValuesError>
Provides a view of ValueList as LegacySerializedValues
returns
Cow<LegacySerializedValues>
to make impl ValueList for LegacySerializedValues efficientfn write_to_request( &self, buf: &mut impl BufMut, ) -> Result<(), SerializeValuesError>
impl Eq for LegacySerializedValues
impl StructuralPartialEq for LegacySerializedValues
Auto Trait Implementations§
impl Freeze for LegacySerializedValues
impl RefUnwindSafe for LegacySerializedValues
impl Send for LegacySerializedValues
impl Sync for LegacySerializedValues
impl Unpin for LegacySerializedValues
impl UnwindSafe for LegacySerializedValues
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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