fn serialize_absolute_value<S>(
    val: &Option<i64>,
    serializer: S,
) -> std::result::Result<S::Ok, S::Error>
where
    S: Serializer,
{
    match val {
        Some(v) => serializer.serialize_i64(v.abs()),
        None => serializer.serialize_none(),
    }
}
/// Custom serializer used to serialize limit as its absolute value.
Custom serializer used to serialize limit as its absolute value.
Custom serializer used to serialize limit as its absolute value .
fn serialize_absolute_value<S>(
    val: &Option<i64>,
    serializer: S,
) -> std::result::Result<S::Ok, S::Error>
where
    S: Serializer,
{
    match val {
        Some(v) => serializer.serialize_i64(v.abs()),
        None => serializer.serialize_none(),
    }
}
fn serialize_absolute_value < S > ( val : & Option < i64 > , serializer : S , ) -> std :: result :: Result < S :: Ok , S :: Error > where S : Serializer , { match val { Some ( v ) => serializer . serialize_i64 ( v . abs ( ) ) , None => serializer . serialize_none ( ) , } }
Custom serializer used to serialize limit as its absolute value.
Custom serializer used to serialize limit as its absolute value .
val
&Option<i64>
serializer
S
val
&Option<i64>
serializer
S