pub enum ModelError<'a> {
Target(JsonCtx<'a, TargetError<'a>>),
NoTargetsArray(&'a Value),
}Expand description
The provided json document doesn’t represent a valid model.
Unless the document is very abnormal there should at least be
an array of targets, so the variant ModelError::Target
should occur more often.
Variants§
Target(JsonCtx<'a, TargetError<'a>>)
One of the target-entries produced an error
NoTargetsArray(&'a Value)
There was no json array ([...]) with targets
Trait Implementations§
Source§impl<'a> Debug for ModelError<'a>
impl<'a> Debug for ModelError<'a>
Source§impl<'a> Display for ModelError<'a>
impl<'a> Display for ModelError<'a>
Source§impl<'a> Error for ModelError<'a>
impl<'a> Error for ModelError<'a>
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<'a> From<JsonCtx<'a, TargetError<'a>>> for ModelError<'a>
impl<'a> From<JsonCtx<'a, TargetError<'a>>> for ModelError<'a>
Source§fn from(value: JsonCtx<'a, TargetError<'a>>) -> Self
fn from(value: JsonCtx<'a, TargetError<'a>>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<ModelError<'a>> for ParseError<'a>
impl<'a> From<ModelError<'a>> for ParseError<'a>
Source§fn from(value: ModelError<'a>) -> Self
fn from(value: ModelError<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !Send for ModelError<'a>
impl<'a> !Sync for ModelError<'a>
impl<'a> Freeze for ModelError<'a>
impl<'a> RefUnwindSafe for ModelError<'a>
impl<'a> Unpin for ModelError<'a>
impl<'a> UnsafeUnpin for ModelError<'a>
impl<'a> UnwindSafe for ModelError<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more