pub enum HttpParameterLocation {
Header,
Query,
Cookie,
}Expand description
Locations supported by named API key and API version parameters.
Variants§
Header
An HTTP request header; names ignore ASCII case.
Query
A URL query parameter; names are case-sensitive.
Cookie
An HTTP cookie; names are case-sensitive.
Implementations§
Source§impl HttpParameterLocation
impl HttpParameterLocation
Sourcepub fn parse(value: &str) -> Option<Self>
pub fn parse(value: &str) -> Option<Self>
Recognizes the annotation spelling, ignoring ASCII case.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns the spelling used by HTTP annotations and OpenAPI parameters.
Sourcepub fn names_equal(self, first: &str, second: &str) -> bool
pub fn names_equal(self, first: &str, second: &str) -> bool
Compares wire names using this location’s protocol rule.
Sourcepub fn valid_name(self, name: &str) -> bool
pub fn valid_name(self, name: &str) -> bool
Checks a name before it is emitted in a URL, header or cookie.
Trait Implementations§
Source§impl Clone for HttpParameterLocation
impl Clone for HttpParameterLocation
impl Copy for HttpParameterLocation
Source§impl Debug for HttpParameterLocation
impl Debug for HttpParameterLocation
Source§impl<'de> Deserialize<'de> for HttpParameterLocation
impl<'de> Deserialize<'de> for HttpParameterLocation
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HttpParameterLocation
Source§impl PartialEq for HttpParameterLocation
impl PartialEq for HttpParameterLocation
Source§impl Serialize for HttpParameterLocation
impl Serialize for HttpParameterLocation
impl StructuralPartialEq for HttpParameterLocation
Auto Trait Implementations§
impl Freeze for HttpParameterLocation
impl RefUnwindSafe for HttpParameterLocation
impl Send for HttpParameterLocation
impl Sync for HttpParameterLocation
impl Unpin for HttpParameterLocation
impl UnsafeUnpin for HttpParameterLocation
impl UnwindSafe for HttpParameterLocation
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,
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
Compare self to
key and return true if they are equal.