pub struct ErrorContext {
pub file_path: Option<PathBuf>,
pub line: Option<usize>,
pub column: Option<usize>,
pub operation: Option<String>,
pub context_data: RapidMap<String, String>,
}Expand description
Context information for errors
Fields§
§file_path: Option<PathBuf>File being processed when error occurred
line: Option<usize>Line number where error occurred
column: Option<usize>Column where error occurred
operation: Option<String>Operation being performed
context_data: RapidMap<String, String>Additional context data
Implementations§
Source§impl ErrorContext
impl ErrorContext
Sourcepub fn with_file_path(self, file_path: PathBuf) -> Self
pub fn with_file_path(self, file_path: PathBuf) -> Self
Set file path
Sourcepub fn with_column(self, column: usize) -> Self
pub fn with_column(self, column: usize) -> Self
Set column number
Sourcepub fn with_operation(self, operation: String) -> Self
pub fn with_operation(self, operation: String) -> Self
Set operation name
Sourcepub fn with_context_data(self, key: String, value: String) -> Self
pub fn with_context_data(self, key: String, value: String) -> Self
Add context data
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
Auto Trait Implementations§
impl Freeze for ErrorContext
impl RefUnwindSafe for ErrorContext
impl Send for ErrorContext
impl Sync for ErrorContext
impl Unpin for ErrorContext
impl UnsafeUnpin 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