Enum Traversal Copy item path Source pub enum Traversal {
Absent(usize ),
TooShort(usize ),
NotFound(usize ),
TooLong(usize ),
Access(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).
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
.
The key ends early and does not reach a leaf node.
The key was not found (index parse failure or too large,
name not found or invalid).
The key is too long and goes beyond a leaf node.
A node could not be accessed or is invalid.
This is returned from custom implementations.
Pass it up one hierarchy depth level, incrementing its usize depth field by one.
Return the traversal depth
Performs copy-assignment from
source
.
Read more Formats the value using the given formatter.
Read more Formats the value using the given formatter.
Read more Returns the lower-level source of this error, if any.
Read more 👎 Deprecated since 1.42.0: use the Display impl or to_string()
👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬 This is a nightly-only experimental API. (error_generic_member_access
)
Provides type-based access to context intended for error reports.
Read more Converts to this type from the input type.
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dst
.
Read more Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From <T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.