#[non_exhaustive]pub enum ErrorPathSegment {
Field(String),
Key(String),
Index(usize),
ScalarKey(String),
ComplexKey,
}Expand description
One segment of an ErrorPath.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Field(String)
Named Serde struct field.
Key(String)
String-like YAML mapping key.
Index(usize)
Zero-based YAML sequence index.
ScalarKey(String)
Scalar YAML mapping key rendered as diagnostic text.
ComplexKey
Complex YAML mapping key that has no compact scalar diagnostic form.
Trait Implementations§
Source§impl Clone for ErrorPathSegment
impl Clone for ErrorPathSegment
Source§fn clone(&self) -> ErrorPathSegment
fn clone(&self) -> ErrorPathSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorPathSegment
impl Debug for ErrorPathSegment
impl Eq for ErrorPathSegment
Source§impl PartialEq for ErrorPathSegment
impl PartialEq for ErrorPathSegment
Source§fn eq(&self, other: &ErrorPathSegment) -> bool
fn eq(&self, other: &ErrorPathSegment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ErrorPathSegment
Auto Trait Implementations§
impl Freeze for ErrorPathSegment
impl RefUnwindSafe for ErrorPathSegment
impl Send for ErrorPathSegment
impl Sync for ErrorPathSegment
impl Unpin for ErrorPathSegment
impl UnsafeUnpin for ErrorPathSegment
impl UnwindSafe for ErrorPathSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more