#[non_exhaustive]pub enum CredentialPlacement {
Bearer,
Header(Cow<'static, str>),
Custom,
}Expand description
Where an adapter puts its scope’s Credential::api_key.
There is no query-string placement: with http-tracing, the request URL,
query included, is recorded on spans. An adapter whose API takes its key
in the query uses Custom and owns the redaction.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bearer
Authorization: Bearer <secret>.
Header(Cow<'static, str>)
<name>: <secret>, such as x-api-key.
Custom
The adapter places the credential itself, for example to sign the
request. HttpRequest::apply_options leaves the scope’s
Credential::api_key alone; the adapter reads it with
HttpRequestOptions::credential_for
and applies it after apply_options, which adds the plain headers a
signature covers. It refuses a kind it cannot place with
Credential::unsupported.
Trait Implementations§
Source§impl Clone for CredentialPlacement
impl Clone for CredentialPlacement
Source§impl Debug for CredentialPlacement
impl Debug for CredentialPlacement
impl Eq for CredentialPlacement
Source§impl PartialEq for CredentialPlacement
impl PartialEq for CredentialPlacement
impl StructuralPartialEq for CredentialPlacement
Auto Trait Implementations§
impl Freeze for CredentialPlacement
impl RefUnwindSafe for CredentialPlacement
impl Send for CredentialPlacement
impl Sync for CredentialPlacement
impl Unpin for CredentialPlacement
impl UnsafeUnpin for CredentialPlacement
impl UnwindSafe for CredentialPlacement
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