pub enum Value {
Null,
Boolean(bool),
Integer(i64),
Real(f64),
Text(String),
Blob(Vec<u8>),
Timestamp(i64),
}Expand description
A database value
Variants§
Null
NULL value (also the Default)
Boolean(bool)
Boolean value
Integer(i64)
64-bit signed integer
Real(f64)
64-bit floating point
Text(String)
UTF-8 string
Blob(Vec<u8>)
Binary data
Timestamp(i64)
Timestamp (Unix milliseconds)
Implementations§
Source§impl Value
impl Value
Sourcepub fn column_type(&self) -> ColumnType
pub fn column_type(&self) -> ColumnType
Get the column type of this value
Sourcepub fn deserialize(buf: &mut impl Buf) -> Result<Self>
pub fn deserialize(buf: &mut impl Buf) -> Result<Self>
Deserialize value from bytes
Sourcepub fn skip(buf: &mut impl Buf) -> Result<()>
pub fn skip(buf: &mut impl Buf) -> Result<()>
Skip past one serialized value in the buffer without allocating. Advances the cursor by the appropriate number of bytes.
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Get the serialized size of this value
Sourcepub fn size_estimate(&self) -> usize
pub fn size_estimate(&self) -> usize
Estimate the memory size of this value (for GC tracking)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
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