#[non_exhaustive]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. The TreeKey<Y>
recursion depth
is an upper bound to the key depth here but not equivalent.
If multiple errors are applicable simultaneously the precedence is as per the order in the enum definition (from high to low).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Absent(usize)
The key is valid, but does not exist at runtime.
This is 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 field 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.