pub enum ParameterLocation {
Path,
Query,
Header,
Body,
}Expand description
Where an Operation parameter is carried in the outgoing request.
Every variant has exactly one consumer in
crate::http::HttpConnector::execute, which is what makes this enum a routing
decision rather than a label: Self::Path is read by substitute_path,
Self::Query by build_query, Self::Header by build_headers and
Self::Body by build_body. A parameter carrying a location whose consumer
does not run is a parameter that is silently dropped, which is the defect
Phase 128 CR-02 recorded.
Variants§
Path
Substituted into the path template (/users/{id}).
Query
Appended to the query string.
Header
Sent as a request header.
Body
Carried as a field of the JSON request body (Phase 128 CR-02).
Only an operation whose method carries a request body
(POST / PUT / PATCH — see
crate::config::method_carries_request_body) may place a parameter here;
crate::tools::build_operation reads that one predicate for BOTH this
assignment and Operation::has_request_body, so a Body-located
parameter on a body-less request is not constructible.
No OpenAPI in: value maps here — the spec models a request body as a
separate requestBody object, not as a parameter — so this variant is
reached only from a curated [[tools]] declaration.
Trait Implementations§
Source§impl Clone for ParameterLocation
impl Clone for ParameterLocation
impl Copy for ParameterLocation
Source§impl Debug for ParameterLocation
impl Debug for ParameterLocation
Source§impl<'de> Deserialize<'de> for ParameterLocation
impl<'de> Deserialize<'de> for ParameterLocation
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>,
impl Eq for ParameterLocation
Source§impl PartialEq for ParameterLocation
impl PartialEq for ParameterLocation
Source§impl Serialize for ParameterLocation
impl Serialize for ParameterLocation
impl StructuralPartialEq for ParameterLocation
Auto Trait Implementations§
impl Freeze for ParameterLocation
impl RefUnwindSafe for ParameterLocation
impl Send for ParameterLocation
impl Sync for ParameterLocation
impl Unpin for ParameterLocation
impl UnsafeUnpin for ParameterLocation
impl UnwindSafe for ParameterLocation
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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