#[non_exhaustive]pub enum ParamError {
Show 27 variants
QueryTooLong,
InvalidEncoding,
InvalidName(String),
UnknownParameter(String),
UnknownField(String),
DuplicateParameter(String),
ConflictingParameters(String),
NonContiguousIndex {
field: String,
expected: usize,
},
WrongArity {
field: String,
operator: &'static str,
expected: &'static str,
actual: usize,
},
InvalidValue {
field: String,
reason: String,
},
NotFilterable(String),
NotSortable(String),
NotSelectable(String),
FieldAccessDenied(String),
OperatorNotAllowed {
field: String,
operator: &'static str,
},
IgnoreCaseNotAllowed(String),
ProjectionNotAllowed,
EmptyProjection,
PagingOutOfRange(String),
PagingNotAllowed,
InvalidGroupExpr(String),
UndefinedGroup(String),
UnusedGroup(String),
MixedPredicatePhase,
UnstablePagination,
DistinctOrderNotProjected(String),
TooComplex(&'static str),
}Expand description
Errors caused by untrusted query parameters or programmatic user queries.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
QueryTooLong
InvalidEncoding
InvalidName(String)
UnknownParameter(String)
UnknownField(String)
DuplicateParameter(String)
ConflictingParameters(String)
NonContiguousIndex
WrongArity
InvalidValue
NotFilterable(String)
NotSortable(String)
NotSelectable(String)
FieldAccessDenied(String)
OperatorNotAllowed
IgnoreCaseNotAllowed(String)
ProjectionNotAllowed
EmptyProjection
PagingOutOfRange(String)
PagingNotAllowed
InvalidGroupExpr(String)
UndefinedGroup(String)
UnusedGroup(String)
MixedPredicatePhase
UnstablePagination
DistinctOrderNotProjected(String)
TooComplex(&'static str)
Trait Implementations§
Source§impl Clone for ParamError
impl Clone for ParamError
Source§fn clone(&self) -> ParamError
fn clone(&self) -> ParamError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParamError
impl Debug for ParamError
Source§impl Display for ParamError
impl Display for ParamError
impl Eq for ParamError
Source§impl Error for ParamError
impl Error for ParamError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ParamError> for PlanError
impl From<ParamError> for PlanError
Source§fn from(source: ParamError) -> PlanError
fn from(source: ParamError) -> PlanError
Converts to this type from the input type.
Source§impl From<ParamError> for PgSearchError
impl From<ParamError> for PgSearchError
Source§fn from(source: ParamError) -> PgSearchError
fn from(source: ParamError) -> PgSearchError
Converts to this type from the input type.
Source§impl From<ParamError> for WebError
impl From<ParamError> for WebError
Source§fn from(error: ParamError) -> WebError
fn from(error: ParamError) -> WebError
Converts to this type from the input type.
Source§impl PartialEq for ParamError
impl PartialEq for ParamError
impl StructuralPartialEq for ParamError
Auto Trait Implementations§
impl Freeze for ParamError
impl RefUnwindSafe for ParamError
impl Send for ParamError
impl Sync for ParamError
impl Unpin for ParamError
impl UnsafeUnpin for ParamError
impl UnwindSafe for ParamError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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