pub enum FilterError {
Show 15 variants
UnexpectedChar {
ch: char,
pos: usize,
},
UnterminatedString {
pos: usize,
},
InvalidNumber {
token: String,
},
ExpectedColumn {
found: String,
},
ColumnTooLong {
column: String,
len: usize,
},
ExpectedOperator {
column: String,
found: String,
},
MissingOperator {
column: String,
},
ExpectedValue {
found: String,
},
MissingValue {
column: String,
},
UnquotedValue {
token: String,
},
ExpectedConnector {
found: String,
},
DanglingConnector {
connector: Connector,
},
NullWithNonEqualityOp {
column: String,
op: Operator,
},
LikeRequiresText {
column: String,
found: &'static str,
},
TooManyConditions {
limit: usize,
},
}Expand description
Every way a where expression can fail to compile. The compiler is
total: it returns one of these or a clause — never a panic.
Variants§
UnexpectedChar
A character outside the grammar’s alphabet (e.g. ;, (, %).
UnterminatedString
A string literal opened but never closed.
InvalidNumber
A numeric token that is neither a valid i64 nor a finite f64.
ExpectedColumn
A column identifier was expected but a non-identifier was found.
ColumnTooLong
A column identifier exceeds Postgres’ 63-byte limit.
ExpectedOperator
An operator was expected after a column but something else was found.
MissingOperator
The expression ended where an operator was expected.
ExpectedValue
A value was expected after an operator but a symbol was found.
MissingValue
The expression ended where a value was expected.
UnquotedValue
A bare word in value position — string values must be quoted.
ExpectedConnector
Two conditions were adjacent with no AND/OR between them.
DanglingConnector
A trailing AND/OR with no following condition (the defect
the frozen Python reference silently mis-renders).
NullWithNonEqualityOp
NULL compared with an operator other than = / !=.
LikeRequiresText
LIKE applied to a non-text value.
TooManyConditions
More than [MAX_CONDITIONS] conditions in one expression.
Trait Implementations§
Source§impl Clone for FilterError
impl Clone for FilterError
Source§fn clone(&self) -> FilterError
fn clone(&self) -> FilterError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FilterError
impl Debug for FilterError
Source§impl Display for FilterError
impl Display for FilterError
Source§impl Error for FilterError
impl Error for FilterError
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()
Source§impl From<FilterError> for StoreError
impl From<FilterError> for StoreError
Source§fn from(e: FilterError) -> Self
fn from(e: FilterError) -> Self
Source§impl PartialEq for FilterError
impl PartialEq for FilterError
Source§fn eq(&self, other: &FilterError) -> bool
fn eq(&self, other: &FilterError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FilterError
Auto Trait Implementations§
impl Freeze for FilterError
impl RefUnwindSafe for FilterError
impl Send for FilterError
impl Sync for FilterError
impl Unpin for FilterError
impl UnsafeUnpin for FilterError
impl UnwindSafe for FilterError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more