Skip to main content

serialize_opt_angle

Function serialize_opt_angle 

Source
pub fn serialize_opt_angle<S, T>(
    value: &Option<T>,
    serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer, T: Serialize, &'a T: for<'a> ToString,
Expand description

Like serialize_angle, but serializes an [&Option<T>] instead of a &T implementing Into<DynQuantity>.

For examples see the serialize_with_units documentation.