pub enum ScalarValue<'de> {
Unit,
Null,
Bool(bool),
Char(char),
I64(i64),
U64(u64),
I128(i128),
U128(u128),
F64(f64),
Str(Cow<'de, str>),
Bytes(Cow<'de, [u8]>),
}Expand description
Scalar data extracted from the wire format.
Variants§
Unit
Unit type (Rust’s ()).
Null
Null literal.
Bool(bool)
Boolean literal.
Char(char)
Character literal.
I64(i64)
Signed integer literal (fits in i64).
U64(u64)
Unsigned integer literal (fits in u64).
I128(i128)
Signed 128-bit integer literal.
U128(u128)
Unsigned 128-bit integer literal.
F64(f64)
Floating-point literal.
Str(Cow<'de, str>)
UTF-8 string literal.
Bytes(Cow<'de, [u8]>)
Binary literal.
Implementations§
Source§impl<'de> ScalarValue<'de>
impl<'de> ScalarValue<'de>
Sourcepub fn to_string_value(&self) -> Option<String>
pub fn to_string_value(&self) -> Option<String>
Convert scalar value to a string representation.
This is a non-generic helper extracted to reduce monomorphization bloat.
Returns None for Bytes since that conversion is context-dependent.
Sourcepub fn to_display_string(&self) -> String
pub fn to_display_string(&self) -> String
Convert scalar value to a display string for error messages.
This is a non-generic helper extracted to reduce monomorphization bloat.
Trait Implementations§
Source§impl<'de> Clone for ScalarValue<'de>
impl<'de> Clone for ScalarValue<'de>
Source§fn clone(&self) -> ScalarValue<'de>
fn clone(&self) -> ScalarValue<'de>
Returns a duplicate 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<'de> Debug for ScalarValue<'de>
impl<'de> Debug for ScalarValue<'de>
Source§impl<'de> PartialEq for ScalarValue<'de>
impl<'de> PartialEq for ScalarValue<'de>
impl<'de> StructuralPartialEq for ScalarValue<'de>
Auto Trait Implementations§
impl<'de> Freeze for ScalarValue<'de>
impl<'de> RefUnwindSafe for ScalarValue<'de>
impl<'de> Send for ScalarValue<'de>
impl<'de> Sync for ScalarValue<'de>
impl<'de> Unpin for ScalarValue<'de>
impl<'de> UnsafeUnpin for ScalarValue<'de>
impl<'de> UnwindSafe for ScalarValue<'de>
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