pub enum SpecError {
Show 13 variants
Json(Error),
DuplicateId(String),
RootMissing(String),
DanglingChild {
element: String,
child: String,
},
Cycle {
path: Vec<String>,
},
DepthExceeded {
max: usize,
found: usize,
path: Vec<String>,
},
InvalidId(String),
FooterMissing {
element_id: String,
footer_id: String,
},
EachPathNotArray {
element_id: String,
path: String,
},
IfPathMissing {
element_id: String,
path: String,
},
EachAsReservedName {
element_id: String,
name: String,
},
NestedEach {
outer: String,
inner: String,
},
MismatchedEach {
parent: String,
parent_path: String,
child: String,
child_path: String,
},
}Expand description
Errors returned by Spec::from_json and SpecBuilder::build.
Variants carry structured payloads (not formatted strings) so tooling can pinpoint the offending element by ID.
Variants§
Json(Error)
DuplicateId(String)
RootMissing(String)
DanglingChild
Cycle
DepthExceeded
InvalidId(String)
EachPathNotArray
IfPathMissing
EachAsReservedName
NestedEach
MismatchedEach
Trait Implementations§
Source§impl Error for SpecError
impl Error for SpecError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SpecError
impl !UnwindSafe for SpecError
impl Freeze for SpecError
impl Send for SpecError
impl Sync for SpecError
impl Unpin for SpecError
impl UnsafeUnpin for SpecError
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