pub struct Error { /* private fields */ }Expand description
A parse that stopped, and enough to say where without quoting the input.
Implementations§
Source§impl Error
impl Error
Sourcepub fn resource(reason: MemoryError, offset: u64) -> Self
pub fn resource(reason: MemoryError, offset: u64) -> Self
An allocation-free resource failure, with an explicitly unavailable path.
Sourcepub fn offset(&self) -> u64
pub fn offset(&self) -> u64
The offset in the document where the trouble is, counted from the start of the whole document rather than of the slice being read.
Sourcepub fn is_limit(&self) -> bool
pub fn is_limit(&self) -> bool
Whether this run declined to finish rather than the input being wrong.
Sourcepub fn is_resource(&self) -> bool
pub fn is_resource(&self) -> bool
Whether resource exhaustion, rather than malformed input, stopped this run.
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl !Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe 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