Struct taskcluster::ClientBuilder[][src]

pub struct ClientBuilder { /* fields omitted */ }

ClientBuilder implements the builder pattern for building a Client, allowing optional configuration of features such as authorized scopes and retry.

Implementations

impl ClientBuilder[src]

pub fn new<S: Into<String>>(root_url: S) -> Self[src]

Create a new ClientBuilder. The Taskcluster root URL is required and so must always be specified.

pub fn credentials(self, credentials: Credentials) -> Self[src]

Add credentials to the client

pub fn retry(self, retry: Retry) -> Self[src]

Set the retry configuration for the client

pub fn timeout(self, timeout: Duration) -> Self[src]

Set the timeout for each HTTP request made by the client. The default is 30 seconds.

pub fn authorized_scopes(
    self,
    authorized_scopes: impl IntoIterator<Item = impl AsRef<str>>
) -> Self
[src]

Set the authorized scopes for this client. These will be passed along with request, and included in signed URLs, and will act as a limit on the scopes available for the operation beyond those afforded by the credentials themselves.

pub fn build(self) -> Result<Client>[src]

Build the resulting client, consuming the builder

Trait Implementations

impl Clone for ClientBuilder[src]

impl Debug for ClientBuilder[src]

impl Default for ClientBuilder[src]

impl From<&'_ str> for ClientBuilder[src]

impl From<String> for ClientBuilder[src]

Auto Trait Implementations

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.