pub struct Client<T: TokenProvider, P: RequestPolicy = Permissive> { /* private fields */ }Expand description
An authorised HTTPS client under request policy P. See the module docs.
Implementations§
Source§impl<T: TokenProvider> Client<T>
impl<T: TokenProvider> Client<T>
Sourcepub fn new(tokens: T, cfg: HttpConfig) -> Result<Self>
pub fn new(tokens: T, cfg: HttpConfig) -> Result<Self>
A client authenticating with tokens, under Permissive.
Source§impl<T: TokenProvider, P: RequestPolicy> Client<T, P>
impl<T: TokenProvider, P: RequestPolicy> Client<T, P>
Sourcepub fn with_policy(tokens: T, policy: P, cfg: HttpConfig) -> Result<Self>
pub fn with_policy(tokens: T, policy: P, cfg: HttpConfig) -> Result<Self>
A client authenticating with tokens that sends only what policy
allows.
Sourcepub fn config(&self) -> &HttpConfig
pub fn config(&self) -> &HttpConfig
The settings.
Trait Implementations§
Source§impl<T: Debug + TokenProvider, P: Debug + RequestPolicy> Debug for Client<T, P>
impl<T: Debug + TokenProvider, P: Debug + RequestPolicy> Debug for Client<T, P>
Source§impl<T: TokenProvider, P: RequestPolicy> Transport for Client<T, P>
impl<T: TokenProvider, P: RequestPolicy> Transport for Client<T, P>
Source§type Send<'a> = impl Future<Output = Result<Response, Error>> + 'a
where
Self: 'a
type Send<'a> = impl Future<Output = Result<Response, Error>> + 'a where Self: 'a
Future of
send.Source§type Open<'a> = impl Future<Output = Result<(u16, Chunks), Error>> + 'a
where
Self: 'a
type Open<'a> = impl Future<Output = Result<(u16, Chunks), Error>> + 'a where Self: 'a
Future of
open.Auto Trait Implementations§
impl<T, P = Permissive> !RefUnwindSafe for Client<T, P>
impl<T, P = Permissive> !UnwindSafe for Client<T, P>
impl<T, P> Freeze for Client<T, P>
impl<T, P> Send for Client<T, P>
impl<T, P> Sync for Client<T, P>
impl<T, P> Unpin for Client<T, P>
impl<T, P> UnsafeUnpin for Client<T, P>where
T: UnsafeUnpin,
P: UnsafeUnpin,
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