[][src]Struct automate::Session

pub struct Session { /* fields omitted */ }

Methods

impl Session[src]

pub fn send<M: Into<Message>>(&self, msg: M) -> Result<(), Error>[src]

Methods from Deref<Target = HttpAPI>

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 Deref for Session[src]

type Target = HttpAPI

The resulting type after dereferencing.

Auto Trait Implementations

impl Send for Session

impl Sync for Session

impl Unpin for Session

impl !UnwindSafe for Session

impl !RefUnwindSafe for Session

Blanket Implementations

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

impl<T> From<T> for 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.

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