/// Validates that ordinal is non-zero.
Validates that ordinal is non-zero.
Validates that ordinal is non - zero .
fn validate_ordinal<'de, D>(deserializer: D) -> Result<u32, D::Error>
where
    D: Deserializer<'de>,
{
    let ordinal = u32::deserialize(deserializer)?;
    if ordinal == 0 {
        return Err(serde::de::Error::custom("Ordinal must not be equal to 0"));
    }
    Ok(ordinal)
}
fn validate_ordinal < ' de , D > ( deserializer : D ) -> Result < u32 , D :: Error > where D : Deserializer < ' de > , { let ordinal = u32 :: deserialize ( deserializer ) ? ; if ordinal == 0 { return Err ( serde :: de :: Error :: custom ( " " ) ) ; } Ok ( ordinal ) }
Validates that ordinal is non-zero.
Validates that ordinal is non - zero .
deserializer
D