Struct ValueError
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§
§impl ValueError
impl ValueError
pub fn new(source: Error) -> ValueError
pub fn new(source: Error) -> ValueError
Creates a new ValueError error.
Trait Implementations§
§impl Clone for ValueError
impl Clone for ValueError
§fn clone(&self) -> ValueError
fn clone(&self) -> ValueError
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 more§impl Debug for ValueError
impl Debug for ValueError
§impl Display for ValueError
impl Display for ValueError
§impl Error for ValueError
impl Error for ValueError
§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()
§impl From<Error> for ValueError
impl From<Error> for ValueError
§fn from(source: Error) -> ValueError
fn from(source: Error) -> ValueError
Converts to this type from the input type.
§impl From<Error> for ValueError
impl From<Error> for ValueError
§fn from(source: Error) -> ValueError
fn from(source: Error) -> ValueError
Converts to this type from the input type.
§impl StackError for ValueError
impl StackError for ValueError
§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.
§fn into_std(self: Box<ValueError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<ValueError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.
§fn as_dyn(&self) -> &dyn StackError
fn as_dyn(&self) -> &dyn StackError
Returns this error as a
dyn StackError.§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.
§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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