pub struct AuthenticatedClient<C, A> { /* private fields */ }Expand description
A client authenticated to the OIDC provider.
Implementations§
Source§impl<C, A> AuthenticatedClient<C, A>
impl<C, A> AuthenticatedClient<C, A>
Sourcepub fn new(inner: C, authorization: A) -> Self
pub fn new(inner: C, authorization: A) -> Self
Create a new AuthenticatedClient with a valid authorization.
Trait Implementations§
Source§impl<C: Client + Sync, A: Authorization + Sync> Client for AuthenticatedClient<C, A>
impl<C: Client + Sync, A: Authorization + Sync> Client for AuthenticatedClient<C, A>
Source§type ClientError = <C as Client>::ClientError
type ClientError = <C as Client>::ClientError
An error that can be returned during request execution by the AuthenticatedClient.
Source§fn execute<'life0, 'async_trait, R>(
&'life0 self,
request: R,
) -> Pin<Box<dyn Future<Output = Result<R::Response, Self::ClientError>> + Send + 'async_trait>>where
R: 'async_trait + HttpRequest + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait, R>(
&'life0 self,
request: R,
) -> Pin<Box<dyn Future<Output = Result<R::Response, Self::ClientError>> + Send + 'async_trait>>where
R: 'async_trait + HttpRequest + Send,
Self: 'async_trait,
'life0: 'async_trait,
Execute a http_request_derive::HttpRequest, and read the typed response.
Auto Trait Implementations§
impl<C, A> Freeze for AuthenticatedClient<C, A>
impl<C, A> RefUnwindSafe for AuthenticatedClient<C, A>where
C: RefUnwindSafe,
A: RefUnwindSafe,
impl<C, A> Send for AuthenticatedClient<C, A>
impl<C, A> Sync for AuthenticatedClient<C, A>
impl<C, A> Unpin for AuthenticatedClient<C, A>
impl<C, A> UnwindSafe for AuthenticatedClient<C, A>where
C: UnwindSafe,
A: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more