pub enum Value<'a> {
Show 16 variants
Null,
Bool(bool),
Int(i32),
Int8(i64),
Float(f64),
Text(Cow<'a, str>),
Numeric(Cow<'a, str>),
Bytes(Cow<'a, [u8]>),
Json(Cow<'a, str>),
Uuid(Cow<'a, str>),
TemporalText {
oid: u32,
text: Cow<'a, str>,
},
Date(i32),
Timestamp {
microseconds: i64,
timestamptz: bool,
},
Array(Vec<Value<'a>>),
Raw {
oid: u32,
bytes: Cow<'a, [u8]>,
},
Unknown {
oid: u32,
text: Cow<'a, str>,
},
}Variants§
Null
Bool(bool)
Int(i32)
Int8(i64)
Float(f64)
Text(Cow<'a, str>)
Numeric(Cow<'a, str>)
Bytes(Cow<'a, [u8]>)
Json(Cow<'a, str>)
Uuid(Cow<'a, str>)
TemporalText
ISO DateStyle text; preserves infinity and local-time timestamp meaning.
Date(i32)
PostgreSQL epoch: days after 2000-01-01. i32 extrema are infinities.
Timestamp
Microseconds after 2000-01-01; timestamptz=true means UTC.
Array(Vec<Value<'a>>)
Raw
Unknown binary types are deliberately not interpreted as UTF-8.
Unknown
Text-format value of an OID with no codec here (time, interval, inet,
oid, xml, enums, …). Distinct from Text, which only text, varchar,
bpchar and name produce, so a host can apply its own parser.
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnsafeUnpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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