Struct bcder::decode::DecodeError
source · pub struct DecodeError<S> { /* private fields */ }
Expand description
An error happened while decoding data.
This can either be a source error – which the type is generic over – or a content error annotated with the position in the source where it happened.
Implementations§
source§impl<S> DecodeError<S>
impl<S> DecodeError<S>
sourcepub fn content(error: impl Into<ContentError>, pos: Pos) -> Self
pub fn content(error: impl Into<ContentError>, pos: Pos) -> Self
Creates a decode error from a content error and a position.
source§impl DecodeError<Infallible>
impl DecodeError<Infallible>
sourcepub fn convert<S>(self) -> DecodeError<S>
pub fn convert<S>(self) -> DecodeError<S>
Converts a decode error from an infallible source into another error.
Trait Implementations§
source§impl<S: Debug> Debug for DecodeError<S>
impl<S: Debug> Debug for DecodeError<S>
source§impl<S: Display> Display for DecodeError<S>
impl<S: Display> Display for DecodeError<S>
source§impl<S: Display + Debug> Error for DecodeError<S>
impl<S: Display + Debug> Error for DecodeError<S>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<DecodeError<Infallible>> for ContentError
impl From<DecodeError<Infallible>> for ContentError
source§fn from(err: DecodeError<Infallible>) -> Self
fn from(err: DecodeError<Infallible>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S> !RefUnwindSafe for DecodeError<S>
impl<S> Send for DecodeError<S>where
S: Send,
impl<S> Sync for DecodeError<S>where
S: Sync,
impl<S> Unpin for DecodeError<S>where
S: Unpin,
impl<S> !UnwindSafe for DecodeError<S>
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