[][src]Struct monzo_lib::ClientBuilder

pub struct ClientBuilder { /* fields omitted */ }

The ClientBuilder is used for configuring and constructing a new Monzo Client

Methods

impl ClientBuilder[src]

pub fn access_token(self, access_token: impl Into<String>) -> Self[src]

Set the access token for querying the Monzo API. This is required if the refresh token is not set

pub fn refresh_token(self, refresh_token: impl Into<String>) -> Self[src]

Set the refresh token for generating a new access token. This is required if the access token is not provided

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

consumes the ClientBuilder and returns a Client.

Panics

This method will panic if neither the access token or refresh token are set

Note

Currently this naively assumes that the access token is provided, and valid. no logic for refreshing the token is yet implemented.

Trait Implementations

impl Default for ClientBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]