deserialize_string_to_u8

Function deserialize_string_to_u8 

Source
pub fn deserialize_string_to_u8<'de, D>(deserializer: D) -> Result<u8, D::Error>
where D: Deserializer<'de>,
Expand description

Deserializes a u8 from a string field.

Returns 0 if the string is empty.

ยงErrors

Returns an error if the string cannot be parsed as a u8.