pub struct ErrorContext {
pub record_index: Option<u64>,
pub field_path: Option<String>,
pub byte_offset: Option<u64>,
pub line_number: Option<u32>,
pub details: Option<String>,
}Expand description
Context information for detailed error reporting
Provides comprehensive location and contextual information for errors, enabling precise error reporting and debugging in enterprise environments. All fields are optional to accommodate different error scenarios.
Fields§
§record_index: Option<u64>Record number (1-based) where the error occurred
Used for data processing errors to identify the specific record in multi-record files or streams.
field_path: Option<String>Hierarchical field path where the error occurred
Uses dot notation (e.g., “customer.address.street”) to identify the exact field location within nested structures.
byte_offset: Option<u64>Byte offset within the record or file where the error occurred
Provides precise location information for debugging binary data issues.
line_number: Option<u32>Line number in the copybook source (for parse errors)
Used during copybook parsing to identify problematic COBOL syntax.
details: Option<String>Additional context-specific information
Free-form text providing extra details relevant to the specific error.
Trait Implementations§
Source§impl Clone for ErrorContext
impl Clone for ErrorContext
Source§fn clone(&self) -> ErrorContext
fn clone(&self) -> ErrorContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more