[][src]Struct automate::Discord

pub struct Discord { /* fields omitted */ }

Methods

impl Discord[src]

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

pub fn with_listener(self, listener: Box<dyn Listener + Send>) -> Self[src]

pub async fn connect(self) -> 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 Discord[src]

type Target = HttpAPI

The resulting type after dereferencing.

Auto Trait Implementations

impl Send for Discord

impl Sync for Discord

impl Unpin for Discord

impl !UnwindSafe for Discord

impl !RefUnwindSafe for Discord

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