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

  • Deserializes a hex string from an ObjectId.
  • Serializes a hex string as an ObjectId.