pub enum Value {
Null,
Int64(i64),
Uint64(u64),
Double(f64),
Boolean(bool),
String(Vec<u8>),
Any(Vec<u8>),
}Expand description
One column value.
The variants are the YTsaurus value types that survive both transports
unchanged. Composite is deliberately absent: HTTP renders it as YSON and
RPC as a distinct wire type, and unifying them would mean claiming a
round-trip this crate cannot guarantee. Use Value::Any and read the YSON.
Variants§
Null
Int64(i64)
Uint64(u64)
Double(f64)
Boolean(bool)
String(Vec<u8>)
A byte string. YTsaurus strings are bytes, not text, so this is not
String: a column may legitimately hold something that is not UTF-8.
Any(Vec<u8>)
A YSON-encoded value of any shape.
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
The value as text, if it is a byte string that happens to be UTF-8.
pub fn as_i64(&self) -> Option<i64>
pub fn as_u64(&self) -> Option<u64>
pub fn as_f64(&self) -> Option<f64>
pub fn as_bool(&self) -> Option<bool>
pub fn is_null(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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