Expand description
Serialization and deserialization of ULIDs through their inner u128 type.
To use it, annotate a field with
#[serde(with = "ulid_as_u128")],
#[serde(serialize_with = "ulid_as_u128")], or
#[serde(deserialize_with = "ulid_as_u128")].
§Examples
#[derive(Serialize, Deserialize)]
struct U128Example {
#[serde(with = "ulid_as_u128")]
identifier: Ulid
}Functions§
- deserialize
- Deserializes a ULID from a u128 type.
- serialize
- Serializes a ULID as a u128 type.