pub enum QueryError {
Serialize(Error),
Utf8(FromUtf8Error),
UnsupportedBytesParameter(String),
InvalidDateTimeParameter {
path: String,
millis: i64,
},
InvalidParameterName,
DuplicateParameterName(String),
MixedParameterModes,
ParameterTypeMismatch {
path: String,
expected: QueryParamType,
actual: &'static str,
},
ParameterNameMismatch {
missing_values: Vec<String>,
extra_values: Vec<String>,
},
}Expand description
Query serialization errors.
Variants§
Serialize(Error)
JSON serialization error.
Utf8(FromUtf8Error)
UTF-8 conversion error.
UnsupportedBytesParameter(String)
Bytes cannot be represented safely in query parameters.
InvalidDateTimeParameter
Datetime could not be rendered.
InvalidParameterName
Parameter names must be non-empty.
DuplicateParameterName(String)
Parameter names must be unique within one request.
MixedParameterModes
Typed and untyped parameters cannot be mixed.
ParameterTypeMismatch
A value does not satisfy its declared schema.
Fields
§
expected: QueryParamTypeExpected schema.
ParameterNameMismatch
Typed parameter names must exactly match value names.
Implementations§
Source§impl QueryError
impl QueryError
Sourcepub fn unsupported_bytes(path: impl Into<String>) -> QueryError
pub fn unsupported_bytes(path: impl Into<String>) -> QueryError
Bytes parameter error.
Sourcepub fn invalid_datetime(path: impl Into<String>, millis: i64) -> QueryError
pub fn invalid_datetime(path: impl Into<String>, millis: i64) -> QueryError
Datetime parameter error.
Trait Implementations§
Source§impl Debug for QueryError
impl Debug for QueryError
Source§impl Display for QueryError
impl Display for QueryError
Source§impl Error for QueryError
impl Error for QueryError
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<Error> for QueryError
impl From<Error> for QueryError
Source§fn from(value: Error) -> QueryError
fn from(value: Error) -> QueryError
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for QueryError
impl From<FromUtf8Error> for QueryError
Source§fn from(value: FromUtf8Error) -> QueryError
fn from(value: FromUtf8Error) -> QueryError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for QueryError
impl !UnwindSafe for QueryError
impl Freeze for QueryError
impl Send for QueryError
impl Sync for QueryError
impl Unpin for QueryError
impl UnsafeUnpin for QueryError
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