Skip to main content

Module common

Module common 

Source

Functionsยง

deserialize_from_str
Deserialize JSON string to any type.
deserialize_from_str_opt
Deserialize JSON string to any type, returning None on error.
deserialize_from_str_or_default
Deserialize JSON string to any type with Default fallback.
deserialize_from_string_opt
Deserialize optional JSON String to any type, returning None on error or if None.
deserialize_from_string_opt_or_default
Deserialize optional JSON String to any type, returning default on error or if None.
deserialize_from_value
Deserialize a serde_json::Value into T.
deserialize_from_value_opt
Deserialize a serde_json::Value into T, returning None on type mismatch.
deserialize_from_value_or_custom_default
Deserializes a serde_json::Value and passes it to then, logging message at debug level and returning default if deserialization fails.
serialize_to_string
Serialize any type to JSON string.
serialize_to_value
Serialize any type to a serde_json::Value.
serialize_to_value_or_custom_default
Serializes value to a serde_json::Value and passes it to then, logging message at debug level and returning default if serialization fails.
serialize_to_vec_or_default
Serialize any type to JSON bytes, returning an empty Vec on error.
utcnow_str
uuid7_str