pub struct ApiKeyAuth {
pub in: ApiKeyLocation,
pub name: String,
pub value: String,
}Expand description
Auth::api_key: a static value sent as either a header or a query
parameter.
auth:
api_key:
in: header # or: query
name: X-API-Key # or a query param name
value: {{api_key}}in: header sets the header named name to value, the same as an
entry under headers: would. in: query adds name/value as an
additional query parameter through the same mechanism
crate::Request::resolve_query already uses for query: — not a
separate ad-hoc code path — so it inherits that mechanism’s percent-
encoding and its “the more structured source wins on a name collision
with the URL’s own query string” rule. See
crate::Request::resolve_auth for exactly how.
Fields§
§in: ApiKeyLocation§name: String§value: StringTrait Implementations§
Source§impl Clone for ApiKeyAuth
impl Clone for ApiKeyAuth
Source§fn clone(&self) -> ApiKeyAuth
fn clone(&self) -> ApiKeyAuth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ApiKeyAuth
impl Debug for ApiKeyAuth
Source§impl<'de> Deserialize<'de> for ApiKeyAuth
impl<'de> Deserialize<'de> for ApiKeyAuth
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 ApiKeyAuth
Source§impl PartialEq for ApiKeyAuth
impl PartialEq for ApiKeyAuth
Source§impl Serialize for ApiKeyAuth
impl Serialize for ApiKeyAuth
impl StructuralPartialEq for ApiKeyAuth
Auto Trait Implementations§
impl Freeze for ApiKeyAuth
impl RefUnwindSafe for ApiKeyAuth
impl Send for ApiKeyAuth
impl Sync for ApiKeyAuth
impl Unpin for ApiKeyAuth
impl UnsafeUnpin for ApiKeyAuth
impl UnwindSafe for ApiKeyAuth
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
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§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.