Enum Value Copy item path Source pub enum Value {
Show 19 variants Null,
Bool(bool ),
I32(i32 ),
I64(i64 ),
F64(f64 ),
Decimal(Decimal ),
DateTime(NaiveDateTime ),
Uuid(Uuid ),
Json(Value ),
Hstore(BTreeMap <String , Option <String >>),
Geometry(String ),
Geography(String ),
Vector(Vec <f32 >),
String(String ),
Bytes(Vec <u8 >),
Array(Vec <Value >),
Array2D(Vec <Vec <Value >>),
Enum {
value: String ,
type_name: String ,
},
Composite {
type_name: String ,
fields: Vec <Value >,
},
}Expand description Database value type.
Implements custom JSON serialization for cross-language compatibility:
Decimal -> string (avoid precision loss)
DateTime -> RFC3339 string
Uuid -> hyphenated lowercase string
Bytes -> base64 string
Decimal number with arbitrary precision.
Date and time (without timezone).
PostgreSQL hstore key/value map.
PostgreSQL PostGIS geometry value.
PostgreSQL PostGIS geography value.
PostgreSQL pgvector dense embedding vector.
Array of values (PostgreSQL native arrays).
2D array of values (PostgreSQL multi-dimensional arrays).
A database enum value with its PostgreSQL type name.
Carries the variant string (e.g. "ADMIN") together with the
lowercase PG type name (e.g. "role") so that the PostgreSQL
dialect can emit the required explicit cast ($1::role).
All other backends treat this identically to Value::String.
Fields The enum variant string sent to / received from the DB.
Lowercase PostgreSQL type name (e.g. "role", "poststatus").
A PostgreSQL native composite type value.
Carries the lowercase PG type name (e.g. "championstats") together
with the field values in their declared order. The PostgreSQL dialect
emits the required explicit cast ($1::championstats) and the connector
encodes the fields as a record literal (("0","0",…)). Backends that
store composites as JSON never receive this variant.
Fields Lowercase PostgreSQL type name (e.g. "championstats").
Field values in the composite type’s declared order.
Convert this value into the plain JSON shape used on transport/wire paths.
Unlike the serde representation of Value itself, this helper
intentionally mirrors the historic untagged encoding used by the engine
and generated raw-query helpers.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Deserialize this value from the given Serde deserializer.
Read more Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Serialize this value into the given Serde serializer.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.