Function uuid::serde::braced::serialize

source ·
pub fn serialize<S>(u: &Uuid, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,
Expand description

Serialize from a Uuid as a uuid::fmt::Braced

§Example

#[derive(serde_derive::Serialize)]
struct Struct {
    // This will be serialize as uuid::fmt::Braced
    #[serde(serialize_with = "uuid::serde::braced::serialize")]
    id: uuid::Uuid,
}