pub enum Value {
Null,
Int(i64),
Decimal {
value: i128,
scale: u32,
},
Double(f64),
Char(String),
Binary(Vec<u8>),
}Expand description
A value at the database boundary.
Variants§
Null
Int(i64)
Decimal
The unscaled value and its decimal places.
Double(f64)
Char(String)
Binary(Vec<u8>)
Implementations§
Source§impl Value
impl Value
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
The value as a recording writes it, a string without its trailing blanks; NULL as nothing.
Sourcepub fn decimal_text(value: i128, scale: u32) -> String
pub fn decimal_text(value: i128, scale: u32) -> String
A decimal’s text, -1234.50 for -123450 at scale 2, as recordings and backends write it.
Sourcepub fn parse_decimal(text: &str) -> Option<Value>
pub fn parse_decimal(text: &str) -> Option<Value>
A decimal from its text, its scale the count of digits after the point.
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