[][src]Struct strife::Http

pub struct Http { /* fields omitted */ }

An HTTP client for performing requests to the REST API.

Methods

impl Http[src]

pub fn new<S: AsRef<str>>(token: S) -> Http[src]

Creates a new HTTP client with the given API token.

pub async fn request<'_, '_, T: DeserializeOwned>(
    &'_ self,
    req: Request<'_>
) -> Result<T>
[src]

Performs a request with rate limiting if necessary.

Stability

This is not part of the stable API and may change at any time.

Auto Trait Implementations

impl !RefUnwindSafe for Http

impl Send for Http

impl Sync for Http

impl Unpin for Http

impl !UnwindSafe for Http

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