[][src]Struct rfesi::EsiBuilder

pub struct EsiBuilder { /* fields omitted */ }

Builder for the Esi struct.


let mut esi = EsiBuilder::new()
    .user_agent("some user agent")


impl EsiBuilder[src]

pub fn new() -> Self[src]

Start a new builder.

pub fn version(self, val: &str) -> Self[src]

Set the version of ESI to use.

Will default to "latest" if not set.

pub fn client_id(self, val: &str) -> Self[src]

pub fn client_secret(self, val: &str) -> Self[src]

pub fn callback_url(self, val: &str) -> Self[src]

pub fn scope(self, val: &str) -> Self[src]

pub fn access_token(self, val: Option<&str>) -> Self[src]

pub fn access_expiration(self, val: Option<u64>) -> Self[src]

pub fn refresh_token(self, val: Option<&str>) -> Self[src]

pub fn user_agent(self, val: &str) -> Self[src]

pub fn http_timeout(self, val: Option<u64>) -> Self[src]

Set the timeout to use in millis when sending HTTP requests.

Will default to 60,000 (1 minute) if not set.

pub fn build(self) -> Result<Esi, EsiError>[src]

Construct the Esi instance.

There are a few things that could go wrong, like not setting one of the mandatory fields or providing a user agent that is not a valid HTTP header value.

Trait Implementations

impl Clone for EsiBuilder[src]

impl Debug for EsiBuilder[src]

impl Default for EsiBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.