#[non_exhaustive]pub enum ParameterIn {
Query,
Header,
Path,
Cookie,
Querystring,
}Expand description
Where a parameter is carried.
#[non_exhaustive] because OpenAPI 3.2 adds to this and the addition is
#[cfg]-gated. Cargo unifies features across a dependency graph, so any
crate enabling openapi32 enables it for every crate in the build – and
without this attribute that would turn a downstream exhaustive match into
a compile error, which is not what “purely additive” is supposed to mean.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Query
A named query string parameter.
The default only because a location has to be one of these; a parameter built through the constructors always has its location set explicitly.
Header
A request header.
Note that Accept, Content-Type and Authorization must not be
declared this way: the specification says such a definition shall be
ignored. Content negotiation belongs in the content map, and
credentials belong in a SecurityScheme.
Path
A variable in the path template. Always required.
Cookie
A cookie.
Querystring
The entire query string, described by media type.
Introduced in OpenAPI 3.2. This is the sanctioned way to describe query strings that a sequence of named parameters cannot express — nested filters, JSON in the query, RFC 9535 JSONPath. It must be the only query-related parameter on its operation.
Implementations§
Trait Implementations§
Source§impl Clone for ParameterIn
impl Clone for ParameterIn
impl Copy for ParameterIn
Source§impl Debug for ParameterIn
impl Debug for ParameterIn
Source§impl Default for ParameterIn
impl Default for ParameterIn
Source§impl<'de> Deserialize<'de> for ParameterIn
impl<'de> Deserialize<'de> for ParameterIn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ParameterIn
impl Display for ParameterIn
impl Eq for ParameterIn
Source§impl Hash for ParameterIn
impl Hash for ParameterIn
Source§impl PartialEq for ParameterIn
impl PartialEq for ParameterIn
Source§impl Serialize for ParameterIn
impl Serialize for ParameterIn
impl StructuralPartialEq for ParameterIn
Auto Trait Implementations§
impl Freeze for ParameterIn
impl RefUnwindSafe for ParameterIn
impl Send for ParameterIn
impl Sync for ParameterIn
impl Unpin for ParameterIn
impl UnsafeUnpin for ParameterIn
impl UnwindSafe for ParameterIn
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.