[][src]Struct rfesi::EsiBuilder

pub struct EsiBuilder { /* fields omitted */ }

Builder for the Esi struct.

Example

let mut esi = EsiBuilder::new()
    .user_agent("some user agent")
    .client_id("your_client_id")
    .client_secret("your_client_secret")
    .callback_url("your_callback_url")
    .build()
    .unwrap();

Implementations

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
[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, 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,