pub struct ValueError { /* private fields */ }Expand description
An error from a value track: a moq_json::Error that ? can convert.
ValueWriter returns it, and so do the value-track readers built on
this crate. It displays as the moq_json::Error it wraps, which
json returns for a match on the cause. As a stack error it
converts into an n0_error::AnyError, so ? works on it in a function
that returns an n0_error::Result, which the moq-json error alone does
not.
Implementations§
Source§impl ValueError
impl ValueError
Sourcepub fn new(source: Error) -> Self
pub fn new(source: Error) -> Self
Creates a new ValueError error.
Trait Implementations§
Source§impl Clone for ValueError
impl Clone for ValueError
Source§impl Debug for ValueError
impl Debug for ValueError
Source§impl Display for ValueError
impl Display for ValueError
Source§impl Error for ValueError
impl Error for ValueError
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<Error> for ValueError
impl From<Error> for ValueError
Source§impl From<Error> for ValueError
impl From<Error> for ValueError
Source§impl From<ValueError> for AnyError
impl From<ValueError> for AnyError
Source§fn from(value: ValueError) -> AnyError
fn from(value: ValueError) -> AnyError
Converts to this type from the input type.
Source§impl StackError for ValueError
impl StackError for ValueError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.
Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.
Source§fn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
Returns this error as a
dyn StackError.Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.
Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.
Auto Trait Implementations§
impl Freeze for ValueError
impl RefUnwindSafe for ValueError
impl Send for ValueError
impl Sync for ValueError
impl Unpin for ValueError
impl UnsafeUnpin for ValueError
impl UnwindSafe for ValueError
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