[−][src]Struct modio::Builder
A Builder
can be used to create a Modio
client with custom configuration.
Implementations
impl Builder
[src]
pub fn new<C: Into<Credentials>>(credentials: C) -> Builder
[src]
Constructs a new Builder
.
This is the same as Modio::builder(credentials)
.
pub fn build(self) -> Result<Modio>
[src]
Returns a Modio
client that uses this Builder
configuration.
pub fn client<F>(self, f: F) -> Builder where
F: FnOnce(ClientBuilder) -> ClientBuilder,
[src]
F: FnOnce(ClientBuilder) -> ClientBuilder,
Configure the underlying reqwest
client using reqwest::ClientBuilder
.
pub fn host<S: Into<String>>(self, host: S) -> Builder
[src]
Set the mod.io api host.
Defaults to "https://api.mod.io/v1"
pub fn use_test(self) -> Builder
[src]
Use the mod.io api test host.
pub fn user_agent<V>(self, value: V) -> Builder where
V: TryInto<HeaderValue>,
V::Error: Into<Error>,
[src]
V: TryInto<HeaderValue>,
V::Error: Into<Error>,
Set the user agent used for every request.
Defaults to "modio/{version}"
pub fn proxy(self, proxy: Proxy) -> Builder
[src]
Add a Proxy
to the list of proxies the client will use.
pub fn use_default_tls(self) -> Builder
[src]
Use native TLS backend.
pub fn use_rustls_tls(self) -> Builder
[src]
Use rustls TLS backend.
Auto Trait Implementations
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,