#[non_exhaustive]pub enum HttpClient {
Reqwest(Client),
}Expand description
The HTTP backend used for token requests.
A feature-gated enum rather than a trait: enabling a backend feature adds a variant, and the client stays free of type parameters. Backends must never follow redirects; the ones this crate constructs don’t.
Clone is cheap — the reqwest backend shares one connection pool across
clones — so a single backend can be handed to several clients (e.g.
axum-security-oidc reuses the login client’s backend for discovery and
JWKS fetches).
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.
Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub fn default_reqwest() -> Self
pub fn default_reqwest() -> Self
The default reqwest backend: redirects never followed, 10 second timeout — the same client the builder installs when none is given.
Source§impl HttpClient
impl HttpClient
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
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 HttpClient
impl Debug for HttpClient
Auto Trait Implementations§
impl !RefUnwindSafe for HttpClient
impl !UnwindSafe for HttpClient
impl Freeze for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl UnsafeUnpin for HttpClient
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