Enum Value Copy item path Source pub enum Value {
Show 14 variants Null,
Bool(bool ),
I32(i32 ),
I64(i64 ),
F64(f64 ),
Decimal(Decimal ),
DateTime(NaiveDateTime ),
Uuid(Uuid ),
Json(Value ),
String(String ),
Bytes(Vec <u8 >),
Array(Vec <Value >),
Array2D(Vec <Vec <Value >>),
Enum {
value: String ,
type_name: String ,
},
}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).
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").
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more § Implementation note
This implementation routes through serde_json::Value as an intermediate
step. As a consequence, binary serde formats (bincode, postcard, rmp, etc.)
are not supported — they will succeed structurally but lose type
fidelity because all values are first encoded as JSON. Use this impl only
with text/JSON-compatible formats.
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.
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.