pub struct ValueConversionError { /* private fields */ }Expand description
A precise Rust ↔ Nybl conversion failure.
expected and actual describe the failed boundary. path is empty at
the root and accumulates array indices, dict keys, and Result variants as a
nested conversion unwinds.
Implementations§
Source§impl ValueConversionError
impl ValueConversionError
Sourcepub fn at_path(self, segment: ValuePathSegment) -> Self
pub fn at_path(self, segment: ValuePathSegment) -> Self
Prepend one location to the structured root-to-leaf error path.
This is useful when a custom conversion delegates to another conversion for one of its fields or elements.
Sourcepub fn path(&self) -> &[ValuePathSegment]
pub fn path(&self) -> &[ValuePathSegment]
Structured path from the root value to the failing child.
Trait Implementations§
Source§impl Clone for ValueConversionError
impl Clone for ValueConversionError
Source§impl Debug for ValueConversionError
impl Debug for ValueConversionError
Source§impl Display for ValueConversionError
impl Display for ValueConversionError
impl Eq for ValueConversionError
Source§impl Error for ValueConversionError
impl Error for ValueConversionError
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 PartialEq for ValueConversionError
impl PartialEq for ValueConversionError
impl StructuralPartialEq for ValueConversionError
Auto Trait Implementations§
impl Freeze for ValueConversionError
impl RefUnwindSafe for ValueConversionError
impl Send for ValueConversionError
impl Sync for ValueConversionError
impl Unpin for ValueConversionError
impl UnsafeUnpin for ValueConversionError
impl UnwindSafe for ValueConversionError
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