[][src]Struct automate::HttpAPI

pub struct HttpAPI { /* fields omitted */ }

Methods

impl HttpAPI[src]

pub fn new(token: &str) -> HttpAPI[src]

pub fn token(&self) -> &String[src]

pub async fn get<'_, T>(&'_ self, uri: Uri) -> Result<T, Error> where
    T: FromJson
[src]

pub async fn post<'_, T, U>(&'_ self, uri: Uri, content: T) -> Result<U, Error> where
    T: AsJson,
    U: FromJson
[src]

pub async fn gateway<'_>(&'_ self) -> Result<Gateway, Error>[src]

pub async fn gateway_bot<'_>(&'_ self) -> Result<GatewayBot, Error>[src]

pub async fn create_message<'_>(
    &'_ self,
    channel_id: u64,
    message: CreateMessage
) -> Result<Message, Error>
[src]

Trait Implementations

impl Clone for HttpAPI[src]

Auto Trait Implementations

impl Send for HttpAPI

impl Sync for HttpAPI

impl Unpin for HttpAPI

impl !UnwindSafe for HttpAPI

impl !RefUnwindSafe for HttpAPI

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for 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<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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