[−][src]Struct brawl_api::http::client::Client
Fields
auth_key: String
Methods
impl Client
[src]
Represents an HTTP client which holds the user's API auth key, and is required on every fetch method for authentication. This is usually the starting point for using this library.
See the Client::new
method to start.
pub fn new(auth_key: &str) -> Client
[src]
Creates a new Client with a given API auth key.
Examples
use brawl_api::Client; let my_client = Client::new("my auth key");
pub fn inner(&self) -> &ReqClient
[src]
(For sync usage) Provides an immutable reference to the inner
field.
pub fn inner_mut(&mut self) -> &mut ReqClient
[src]
(For sync usage) Provides a mutable reference to the inner
field.
pub fn a_inner(&self) -> &AReqClient
[src]
(For async usage) Provides an immutable reference to the a_inner
field.
pub fn a_inner_mut(&mut self) -> &mut AReqClient
[src]
(For async usage) Provides a mutable reference to the a_inner
field.
pub fn endpoint_request(&self, endpoint: &str) -> Request
[src]
Creates a Request instance for one specific endpoint and returns it.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> FetchFrom<T> for T where
T: Clone + Send + Sync,
[src]
T: Clone + Send + Sync,
fn fetch_from(&Client, &T) -> Result<T, Error>
[src]
(Sync) Returns a copy of the current instance when attempting to fetch from itself.
In order to re-fetch, see Refetchable
.
Errors
Never errors; is only a Result
in order to match the trait signature.
fn a_fetch_from<'life0, 'life1, 'async_trait>(
&'life0 Client,
&'life1 T
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
[src]
&'life0 Client,
&'life1 T
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
(Async) Returns a copy of the current instance when attempting to fetch from itself.
In order to re-fetch, see Refetchable
.
Errors
Never errors; is only a Result
in order to match the trait signature.
impl<T, U> FetchInto<U> for T where
T: Sync + Send,
U: FetchFrom<T> + Sync + Send,
[src]
T: Sync + Send,
U: FetchFrom<T> + Sync + Send,
fn fetch_into(&Self, &Client) -> Result<U, Error>
[src]
fn a_fetch_into<'life0, 'life1, 'async_trait>(
&'life0 Self,
&'life1 Client
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
U: 'async_trait,
[src]
&'life0 Self,
&'life1 Client
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
U: 'async_trait,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,