pub enum MvtValue {
String(String),
Float(f32),
Double(f64),
Int(i64),
UInt(u64),
SInt(i64),
Bool(bool),
Null,
}Variants§
Implementations§
Source§impl MvtValue
impl MvtValue
Sourcepub fn auto_int(value: impl Into<i64>) -> Self
pub fn auto_int(value: impl Into<i64>) -> Self
Create an integer value using the smallest MVT wire encoding for value.
Non-negative values become MvtValue::UInt (a plain varint) and negative
values become MvtValue::SInt (a zig-zag varint), whichever needs fewer
bytes. This is always at least as compact as MvtValue::Int, which
sign-extends any negative to a full 10-byte varint.
Accepts any signed integer that fits in i64 (i8/i16/i32/i64).
Trait Implementations§
impl Eq for MvtValue
impl PtrRead for MvtValue
Auto Trait Implementations§
impl Freeze for MvtValue
impl RefUnwindSafe for MvtValue
impl Send for MvtValue
impl Sync for MvtValue
impl Unpin for MvtValue
impl UnsafeUnpin for MvtValue
impl UnwindSafe for MvtValue
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