[−][src]Struct strife::Http
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]
&'_ self,
req: Request<'_>
) -> Result<T>
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]
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,