pub trait ErrorContext<T> {
// Required methods
fn with_rule_context(self, rule_id: &str) -> Result<T>;
fn with_document_context(self, path: &str) -> Result<T>;
fn with_plugin_context(self, plugin_id: &str) -> Result<T>;
fn with_config_context(self, field: &str) -> Result<T>;
}Expand description
Error context extension trait for adding contextual information to errors
Required Methods§
Sourcefn with_rule_context(self, rule_id: &str) -> Result<T>
fn with_rule_context(self, rule_id: &str) -> Result<T>
Add rule context to an error
Sourcefn with_document_context(self, path: &str) -> Result<T>
fn with_document_context(self, path: &str) -> Result<T>
Add document context to an error
Sourcefn with_plugin_context(self, plugin_id: &str) -> Result<T>
fn with_plugin_context(self, plugin_id: &str) -> Result<T>
Add plugin context to an error
Sourcefn with_config_context(self, field: &str) -> Result<T>
fn with_config_context(self, field: &str) -> Result<T>
Add configuration context to an error