[][src]Struct modio::Builder

pub struct Builder { /* fields omitted */ }

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.