pub enum ParameterError {
Serialize(Error),
NestedValue,
ExpectedObject,
FormBodyNotObject,
DeepObjectInMultipart,
ExpectedComposite,
InvalidCookie {
parameter: String,
},
EmptyPathSegment,
NonFiniteNumber,
}Expand description
A typed parameter could not be represented by OpenAPI’s scalar/array/object wire model.
An operation reports it as RequestError::Other, whose source() downcasts to this type.
Variants§
Serialize(Error)
Serialization of the generated Rust value failed.
NestedValue
A nested array or object appeared where OpenAPI parameter serialization requires a scalar.
ExpectedObject
A style: deepObject query parameter’s value was not an object
(serialize_deep_object).
FormBodyNotObject
A form-urlencoded request body or in: querystring value did not serialize to a JSON object
(serialize_form_body).
DeepObjectInMultipart
A multipart part was asked for the query-only deepObject style
(serialize_multipart_values).
ExpectedComposite
A style defined only for arrays and objects (spaceDelimited, pipeDelimited) received a
scalar or undefined value.
InvalidCookie
A cookie parameter’s serialized pair holds a byte its CookieValue rule refuses
(cookie_pair). It names the parameter and never the value, which may be a secret.
EmptyPathSegment
A path parameter rendered to the empty string (path_segment), which would leave an
empty segment and send the request to a different resource (/users/{id} to /users/).
NonFiniteNumber
A value held an f64 or f32 NaN or infinity, which neither a parameter style nor JSON
can represent: serialized, it would reach the wire as an undefined value or a JSON null
instead. A parameter, a JSON request body (to_json_vec) and a JSON-encoded part
(to_json_string) are each refused this way.
Trait Implementations§
Source§impl Debug for ParameterError
impl Debug for ParameterError
Source§impl Display for ParameterError
impl Display for ParameterError
Source§impl Error for ParameterError
impl Error for ParameterError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for ParameterError
impl !UnwindSafe for ParameterError
impl Freeze for ParameterError
impl Send for ParameterError
impl Sync for ParameterError
impl Unpin for ParameterError
impl UnsafeUnpin for ParameterError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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