pub enum HooksError {
CannotAddEntryByIndex(usize),
KeyNotFound(MapKeySelector),
FieldNotFound(Cow<'static, str>),
ValueNotSerializable(String),
IndexNotFound(usize),
CannotFlattenUnsupportedDataType(&'static str),
}Expand description
Kinds of recoverable errors.
See Hooks::on_scope_error for more info on handling recoverable errors.
Variants§
CannotAddEntryByIndex(usize)
Cannot add a map entry by specifying an index, please specify key value.
This error occurs when trying to add a map entry, but specifying an index instead of an actual key in the map key selector.
KeyNotFound(MapKeySelector)
This key is not found in the map.
FieldNotFound(Cow<'static, str>)
This field is not found in the struct.
ValueNotSerializable(String)
This value is not serializable.
This error occurs when trying to replace a value using compound scope methods
(e.g. on a struct or map scope), and passing in a Value that is non-primitive.
Non-primitive values, like structs, maps, tuples, are represented by their
metadata, which is obviously not sufficient to serialize them.
IndexNotFound(usize)
This index was not found in the sequence.
CannotFlattenUnsupportedDataType(&'static str)
Flattening was attempted on a struct field that does not contain a struct or a map.