pub struct DecodeError(/* private fields */);
Expand description
An error that occurs when decoding expressions.
Implementations§
Source§impl DecodeError
impl DecodeError
Sourcepub fn new(error_type: DecodeErrorType, path: DecodeErrorPath) -> Self
pub fn new(error_type: DecodeErrorType, path: DecodeErrorPath) -> Self
Create a DecodeError
.
Sourcepub fn error_type(&self) -> &DecodeErrorType
pub fn error_type(&self) -> &DecodeErrorType
Gets the error type.
Sourcepub fn error_path(&self) -> &DecodeErrorPath
pub fn error_path(&self) -> &DecodeErrorPath
Gets the error path.
Sourcepub fn error_path_with(
&mut self,
f: impl FnOnce(DecodeErrorPath) -> DecodeErrorPath,
)
pub fn error_path_with( &mut self, f: impl FnOnce(DecodeErrorPath) -> DecodeErrorPath, )
Updates the error path, based on the original.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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