Module bson::serde_helpers::hex_string_as_object_id [−][src]
Expand description
Contains functions to serialize a hex string as an ObjectId and deserialize a hex string from an ObjectId
#[derive(Serialize, Deserialize)] struct Item { #[serde(with = "hex_string_as_object_id")] pub id: String, }
Functions
deserialize | Deserializes a hex string from an ObjectId. |
serialize | Serializes a hex string as an ObjectId. |