pub fn deserialize_hex_array<'de, D>(deserializer: D) -> Result<[u8; 32], D::Error>
where
    D: serde::de::Deserializer<'de>,
{
    if deserializer.is_human_readable() {
        let string: String = serde::de::Deserialize::deserialize(deserializer)?;
        let mut hex = [0u8; 32];
        from_hex(&string, &mut hex).map_err(serde::de::Error::custom)?;
        Ok(hex)
    } else {
        serde::de::Deserialize::deserialize(deserializer)
    }
}
/// Deserialize an hexadecimal value represented as an array.
Deserialize an hexadecimal value represented as an array.
Deserialize an hexadecimal value represented as an array .
pub fn deserialize_hex_array<'de, D>(deserializer: D) -> Result<[u8; 32], D::Error>
where
    D: serde::de::Deserializer<'de>,
{
    if deserializer.is_human_readable() {
        let string: String = serde::de::Deserialize::deserialize(deserializer)?;
        let mut hex = [0u8; 32];
        from_hex(&string, &mut hex).map_err(serde::de::Error::custom)?;
        Ok(hex)
    } else {
        serde::de::Deserialize::deserialize(deserializer)
    }
}
pub fn deserialize_hex_array < ' de , D > ( deserializer : D ) -> Result < [ u8 ; 32 ] , D :: Error > where D : serde :: de :: Deserializer < ' de > , { if deserializer . is_human_readable ( ) { let string : String = serde :: de :: Deserialize :: deserialize ( deserializer ) ? ; let mut hex = [ 0u8 ; 32 ] ; from_hex ( & string , & mut hex ) . map_err ( serde :: de :: Error :: custom ) ? ; Ok ( hex ) } else { serde :: de :: Deserialize :: deserialize ( deserializer ) } }
Deserialize an hexadecimal value represented as an array.
Deserialize an hexadecimal value represented as an array .
deserializer
D