pub struct Error { /* private fields */ }Expand description
An Acta error with a category, optional file offset, and parsing context.
Implementations§
Source§impl Error
impl Error
pub fn kind(&self) -> ErrorKind
pub fn message(&self) -> &str
Sourcepub fn offset(&self) -> Option<u64>
pub fn offset(&self) -> Option<u64>
The absolute file offset of the field or region that failed the check.
A check over a single field reports that field’s offset. A check over a region, such as a CRC, reports the first byte of the covered region.
Sourcepub fn context(&self) -> &[ErrorContext]
pub fn context(&self) -> &[ErrorContext]
The regions containing the failure, innermost first.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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