#[non_exhaustive]pub enum RdOptionError {
Shape(RdShapeError),
MalformedPair {
path: RdPath,
pair_index: usize,
text: String,
reason: RdOptionPairErrorKind,
},
UnknownKey {
path: RdPath,
pair_index: usize,
key: String,
},
DuplicateKey {
path: RdPath,
pair_index: usize,
key: String,
first_pair_index: usize,
},
InvalidValue {
path: RdPath,
pair_index: usize,
key: RdSexprOptionKey,
value: String,
expected: RdOptionValueKind,
},
}Expand description
A hard or soft option-list diagnostic.
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.
Shape(RdShapeError)
A node had an invalid shape.
MalformedPair
A scalar pair was malformed.
UnknownKey
The key is not recognized.
DuplicateKey
The key occurred previously.
InvalidValue
A recognized typed value could not be decoded.
Implementations§
Trait Implementations§
Source§impl Clone for RdOptionError
impl Clone for RdOptionError
Source§fn clone(&self) -> RdOptionError
fn clone(&self) -> RdOptionError
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 RdOptionError
impl Debug for RdOptionError
Source§impl Display for RdOptionError
impl Display for RdOptionError
impl Eq for RdOptionError
Source§impl Error for RdOptionError
impl Error for RdOptionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<RdShapeError> for RdOptionError
impl From<RdShapeError> for RdOptionError
Source§fn from(error: RdShapeError) -> Self
fn from(error: RdShapeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RdOptionError
impl PartialEq for RdOptionError
impl StructuralPartialEq for RdOptionError
Auto Trait Implementations§
impl Freeze for RdOptionError
impl RefUnwindSafe for RdOptionError
impl Send for RdOptionError
impl Sync for RdOptionError
impl Unpin for RdOptionError
impl UnsafeUnpin for RdOptionError
impl UnwindSafe for RdOptionError
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