pub struct TlvDecodeError {
pub ctx: TlvDecodeErrorCtx,
pub offset: usize,
}Expand description
The structure to store decode context and position for error reporting.
Fields§
§ctx: TlvDecodeErrorCtxThe context at which decode error appears.
offset: usizeThe offset at which decode error appears. It’s mostly offset from the beginning of Type-Length-Value array. Each entry in DbRange is an exception that the offset is from the beginning of the entry.
Implementations§
Source§impl TlvDecodeError
impl TlvDecodeError
pub fn new(ctx: TlvDecodeErrorCtx, offset: usize) -> Self
pub fn delve_into_lowest_error(&self, offset: usize) -> (&TlvDecodeError, usize)
Trait Implementations§
Source§impl Clone for TlvDecodeError
impl Clone for TlvDecodeError
Source§fn clone(&self) -> TlvDecodeError
fn clone(&self) -> TlvDecodeError
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 moreSource§impl Debug for TlvDecodeError
impl Debug for TlvDecodeError
Source§impl Display for TlvDecodeError
impl Display for TlvDecodeError
Source§impl Error for TlvDecodeError
impl Error for TlvDecodeError
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 TlvDecodeError
impl PartialEq for TlvDecodeError
impl Eq for TlvDecodeError
impl StructuralPartialEq for TlvDecodeError
Auto Trait Implementations§
impl Freeze for TlvDecodeError
impl RefUnwindSafe for TlvDecodeError
impl Send for TlvDecodeError
impl Sync for TlvDecodeError
impl Unpin for TlvDecodeError
impl UnwindSafe for TlvDecodeError
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