pub enum Traversal {
Absent(usize),
TooShort(usize),
NotFound(usize),
TooLong(usize),
Access(usize, &'static str),
Invalid(usize, &'static str),
}
Expand description
Errors that can occur when using the Tree traits.
A usize
member indicates the key depth where the error occurred.
The depth here is the number of names or indices consumed.
It is also the number of separators in a path or the length
of an indices slice.
If multiple errors are applicable simultaneously the precedence is as per the order in the enum definition (from high to low).
Variants§
Absent(usize)
A node does not exist at runtime.
An enum
variant in the tree towards the node is currently absent.
This is for example the case if an Option
using the Tree*
traits is None
at runtime. See also crate::TreeKey
.
TooShort(usize)
The key ends early and does not reach a leaf node.
NotFound(usize)
The key was not found (index parse failure or too large, name not found or invalid).
TooLong(usize)
The key is too long and goes beyond a leaf node.
Access(usize, &'static str)
A node could not be accessed.
The get
or get_mut
accessor returned an error message.
Invalid(usize, &'static str)
A deserialized leaf value was found to be invalid.
The validate
callback returned an error message.