pub struct FilterCompileError { /* private fields */ }Expand description
A redaction-safe SQL filter compilation error.
Positions are original UTF-8 byte offsets into the submitted expression. This type deliberately retains neither the expression nor any token, literal, or property text so it can be surfaced at service boundaries safely.
Implementations§
Source§impl FilterCompileError
impl FilterCompileError
Sourcepub const fn descriptor(&self) -> &'static ErrorDescriptor
pub const fn descriptor(&self) -> &'static ErrorDescriptor
Returns the canonical descriptor for this compile failure.
Sourcepub const fn new(
kind: FilterCompileErrorKind,
stage: FilterCompileStage,
position: Option<usize>,
) -> Self
pub const fn new( kind: FilterCompileErrorKind, stage: FilterCompileStage, position: Option<usize>, ) -> Self
Creates a redaction-safe compile error at an original UTF-8 byte offset.
Sourcepub const fn new_with_source(
kind: FilterCompileErrorKind,
stage: FilterCompileStage,
position: Option<usize>,
source: FilterCompileSource,
) -> Self
pub const fn new_with_source( kind: FilterCompileErrorKind, stage: FilterCompileStage, position: Option<usize>, source: FilterCompileSource, ) -> Self
Creates a redaction-safe compile error with a fixed source classification.
Sourcepub const fn kind(&self) -> FilterCompileErrorKind
pub const fn kind(&self) -> FilterCompileErrorKind
Returns the stable compile failure category.
Sourcepub const fn stage(&self) -> FilterCompileStage
pub const fn stage(&self) -> FilterCompileStage
Returns the compiler stage that reported the failure.
Sourcepub const fn position(&self) -> Option<usize>
pub const fn position(&self) -> Option<usize>
Returns the original UTF-8 byte offset, when the failure has one.
Sourcepub const fn source(&self) -> Option<FilterCompileSource>
pub const fn source(&self) -> Option<FilterCompileSource>
Returns the fixed source classification, when the compiler provided one.
Sourcepub fn context(&self) -> ErrorContext
pub fn context(&self) -> ErrorContext
Returns structured, redaction-safe context for this compile failure.
Trait Implementations§
Source§impl Clone for FilterCompileError
impl Clone for FilterCompileError
impl Copy for FilterCompileError
Source§impl Debug for FilterCompileError
impl Debug for FilterCompileError
Source§impl Display for FilterCompileError
impl Display for FilterCompileError
impl Eq for FilterCompileError
Source§impl Error for FilterCompileError
impl Error for FilterCompileError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()