pub trait ApiKey: Sized {
// Provided method
fn into_header(self) -> Option<Result<(HeaderName, HeaderValue)>> { ... }
}Expand description
A trait for API key inputs accepted by ClientBuilder::api_key.
Returning Some inserts a header into the generic Client. Returning None
lets the provider extension handle credentials itself.
Provided Methods§
Sourcefn into_header(self) -> Option<Result<(HeaderName, HeaderValue)>>
fn into_header(self) -> Option<Result<(HeaderName, HeaderValue)>>
Convert this key into a default request header, if the generic client should own that authentication header.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.