Module serde

Module serde 

Source
Expand description

Custom deserializers for various parts of the Icinga API results

Functionsยง

deserialize_empty_string_or_parse
deserialize an optional value with a FromStr implementation where None is represented as an empty string
deserialize_empty_string_or_string
deserialize an optional String where None is represented as an empty string
deserialize_icinga_timestamp
deserializes a unix timestamp with sub second accuracy (usually 6 digits after the decimal point for icinga)
deserialize_optional_icinga_timestamp
deserializes an optional unix timestamp with sub second accuracy (usually 6 digits after the decimal point for icinga) if the value is 0 return None
deserialize_optional_seconds_as_duration
deserialize an integer as a time::Duration where the integer represents seconds
deserialize_seconds_as_duration
deserialize an integer as a time::Duration where the integer represents seconds
serialize_duration_as_seconds
serialize a time::Duration as seconds
serialize_icinga_timestamp
serialize a unix timestamp with sub second accuracy
serialize_none_as_empty_string
serialize an Option<String> as an empty string in the None case and normally otherwise
serialize_none_as_empty_string_or_to_string
serialize an option value with a ToString implementation where None is represented as an empty string
serialize_optional_duration_as_seconds
serialize an optional time::Duration as seconds
serialize_optional_icinga_timestamp
serialize a unix timestamp with sub second accuracy if the value is None serialize 0