pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
Text(String),
Bytes(Vec<u8>),
Json(Json),
}Variants§
Null
Bool(bool)
Int(i64)
Float(f64)
Text(String)
Bytes(Vec<u8>)
Json(Json)
A json/jsonb column, kept parsed.
Implementations§
Source§impl Value
impl Value
pub fn is_null(&self) -> bool
Sourcepub fn to_sql_text(&self) -> Option<String>
pub fn to_sql_text(&self) -> Option<String>
How this value is written into SQL text for the wire.
Parameters are sent out of band (never interpolated into the statement), so this is only the textual encoding of a bound parameter.
Sourcepub fn to_display(&self) -> String
pub fn to_display(&self) -> String
Render for a human: log lines, Telescope, error messages.
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