pub struct ErrorContext { /* private fields */ }Expand description
Error context containing optional entry number and span information.
Implementations§
Source§impl ErrorContext
impl ErrorContext
Sourcepub fn with_entry(self, entry: usize) -> Self
pub fn with_entry(self, entry: usize) -> Self
Add entry number to this context.
Sourcepub fn adjust_offset(self, adjustment: usize) -> Self
pub fn adjust_offset(self, adjustment: usize) -> Self
Adjust the span offset by adding the given amount.
Sourcepub fn with_span_if_none(self, span: Span) -> Self
pub fn with_span_if_none(self, span: Span) -> Self
Set span if not already set.
Trait Implementations§
Source§impl Clone for ErrorContext
impl Clone for ErrorContext
Source§fn clone(&self) -> ErrorContext
fn clone(&self) -> ErrorContext
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 ErrorContext
impl Debug for ErrorContext
Source§impl Default for ErrorContext
impl Default for ErrorContext
Source§fn default() -> ErrorContext
fn default() -> ErrorContext
Returns the “default value” for a type. Read more
Source§impl PartialEq for ErrorContext
impl PartialEq for ErrorContext
impl Eq for ErrorContext
impl StructuralPartialEq for ErrorContext
Auto Trait Implementations§
impl Freeze for ErrorContext
impl RefUnwindSafe for ErrorContext
impl Send for ErrorContext
impl Sync for ErrorContext
impl Unpin for ErrorContext
impl UnwindSafe for ErrorContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.