Struct graph_http::api_impl::GraphClientConfiguration
source · pub struct GraphClientConfiguration { /* private fields */ }
Implementations§
source§impl GraphClientConfiguration
impl GraphClientConfiguration
pub fn new() -> GraphClientConfiguration
pub fn access_token<AT: ToString>( self, access_token: AT ) -> GraphClientConfiguration
pub fn default_headers(self, headers: HeaderMap) -> GraphClientConfiguration
sourcepub fn referer(self, enable: bool) -> GraphClientConfiguration
pub fn referer(self, enable: bool) -> GraphClientConfiguration
Enable or disable automatic setting of the Referer
header.
Default is true
.
sourcepub fn timeout(self, timeout: Duration) -> GraphClientConfiguration
pub fn timeout(self, timeout: Duration) -> GraphClientConfiguration
Enables a request timeout.
The timeout is applied from when the request starts connecting until the response body has finished.
Default is no timeout.
sourcepub fn connect_timeout(self, timeout: Duration) -> GraphClientConfiguration
pub fn connect_timeout(self, timeout: Duration) -> GraphClientConfiguration
Set a timeout for only the connect phase of a Client
.
Default is None
.
Note
This requires the futures be executed in a tokio runtime with a tokio timer enabled.
sourcepub fn connection_verbose(self, verbose: bool) -> GraphClientConfiguration
pub fn connection_verbose(self, verbose: bool) -> GraphClientConfiguration
Set whether connections should emit verbose logs.
Enabling this option will emit log messages at the TRACE
level
for read and write operations on connections.
pub fn user_agent(self, value: HeaderValue) -> GraphClientConfiguration
pub fn min_tls_version(self, version: Version) -> GraphClientConfiguration
pub fn build(self) -> Client
Trait Implementations§
source§impl Clone for GraphClientConfiguration
impl Clone for GraphClientConfiguration
source§fn clone(&self) -> GraphClientConfiguration
fn clone(&self) -> GraphClientConfiguration
Returns a copy of the value. Read more
1.0.0 · 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 GraphClientConfiguration
impl Debug for GraphClientConfiguration
Auto Trait Implementations§
impl RefUnwindSafe for GraphClientConfiguration
impl Send for GraphClientConfiguration
impl Sync for GraphClientConfiguration
impl Unpin for GraphClientConfiguration
impl UnwindSafe for GraphClientConfiguration
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