Module serde_aux::field_attributes
source · Expand description
Contains helpers for the fields.
Structs
- Builder to create a parser, that parses a separated string or a vec into a vec.
Enums
- Pattern on which a string can be split.
Functions
- Allows a
boolfield to be defaulted totrue, rather than the normal default offalse. Useful for fields where the default value should betrue`. - Deserializes boolean from anything (string, number, boolean). If input is a string, it is expected, that it is possible to convert it to a number. The return boolean is
trueif the number was either1or1.0after parsing. - Deserializes a
Celloption number from string or a number. Same logic as"deserialize_option_number_from_string". - Deserializes a
chrono::DateTime<Utc>from a milliseconds time stamp. Useful when the data is coming from a number which is not a seconds time stamp but milliseconds one. It also handles the string to number conversion if the data was passed as a string with number inside like “1519927261900”. - Deserializes a
chrono::DateTime<Utc>from a seconds time stamp. It also handles the string to number conversion if the data was passed as a string with number inside like “1519927261”. - Deserializes default value from nullable value or empty object. If the original value is
nullor{},Default::default()is used. - Deserializes default value from nullable value. If the original value is
null,Default::default()is used. - Deserializes a
Mutexoption number from string or a number. Same logic as"deserialize_option_number_from_string". - Deserializes a number from string or a number.
- Deserializes an option number from string or a number.
- Deserializes a
RefCelloption number from string or a number. Same logic as"deserialize_option_number_from_string". - Deserializes a
RwLockoption number from string or a number. Same logic as"deserialize_option_number_from_string". - Deserializes string from a number. If the original value is a number value, it will be converted to a string.
- Deserializes a comma separated string into a
Vec<T>.
Type Definitions
- A functor returning a
Resultof parsing a string into a vector of objects of typeT.