pub struct ErrorContext {
pub error: ParseError,
pub line: Option<usize>,
pub column: Option<usize>,
pub field_tag: Option<String>,
pub message_type: Option<String>,
pub raw_content: Option<String>,
}
Expand description
Error result with context for better debugging
Fields§
§error: ParseError
§line: Option<usize>
§column: Option<usize>
§field_tag: Option<String>
§message_type: Option<String>
§raw_content: Option<String>
Implementations§
Source§impl ErrorContext
impl ErrorContext
pub fn new(error: ParseError) -> Self
pub fn with_location(self, line: usize, column: usize) -> Self
pub fn with_field(self, field_tag: String) -> Self
pub fn with_message_type(self, message_type: String) -> Self
pub fn with_raw_content(self, raw_content: String) -> Self
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<'de> Deserialize<'de> for ErrorContext
impl<'de> Deserialize<'de> for ErrorContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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