[][src]Struct rosu::OsuBuilder

pub struct OsuBuilder { /* fields omitted */ }

A builder for the main Osu client.

Implementations

impl OsuBuilder[src]

pub fn new(api_key: impl Into<String>) -> Self[src]

Create a new builder to build an Osu struct.

pub fn build(self) -> OsuResult<Osu>[src]

Build the Osu struct.

Errors

Errors if reqwest fails to build the client

pub fn reqwest_client(mut self: Self, client: ReqwestClientBuilder) -> Self[src]

Set a pre-configured reqwest client builder to build off of.

The timeout settings in the reqwest client will be overwritten by those in this builder.

The default client uses Rustls as its TLS backend.

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

Set the timeout for HTTP requests, defaults to 10 seconds.

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

Set the api key to use for requests.

Trait Implementations

impl Debug for OsuBuilder[src]

impl Default for OsuBuilder[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> 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.