#[non_exhaustive]pub enum CoreError {
InvalidCursor {
reason: String,
},
FieldNotFound {
field: String,
},
Filter {
message: String,
},
Sort {
message: String,
},
Search {
message: String,
},
Validation {
message: String,
},
}Expand description
A recoverable error raised by the core engine.
It is a flat, Clone/Eq value type by design: it crosses the FFI boundary
into Python / JS exceptions, so it carries owned messages rather than a
borrowed source() chain. Match on CoreError::kind for behaviour.
#[non_exhaustive]: the crate is published independently (core-v*), so new
variants must not be a breaking change — downstream matches need a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidCursor
A cursor string was malformed, truncated, or tampered with.
FieldNotFound
A field path could not be resolved on an item.
Filter
A filter operator could not be applied (bad regex, bad operand, …).
Sort
A sort operation failed (e.g. values were not comparable).
Search
A search query was invalid.
Validation
An input value failed validation (out of range, mutually exclusive, …).
Implementations§
Trait Implementations§
impl Eq for CoreError
Source§impl Error for CoreError
impl Error for CoreError
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()