[][src]Struct twilight_gateway::shard::Config

pub struct Config { /* fields omitted */ }

The configuration used by the shard to identify with the gateway and operate.

Use Shard::builder to start creating a configured shard.

Implementations

impl Config[src]

pub fn gateway_url(&self) -> Option<&str>[src]

Return an immutable reference to the url used to connect to the gateway.

pub fn http_client(&self) -> &Client[src]

Return an immutable reference to the twilight_http client to be used by the shard.

pub fn intents(&self) -> Intents[src]

Return a copy of the intents that the gateway is using.

pub fn large_threshold(&self) -> u64[src]

Return the maximum threshold at which point the gateway will stop sending a guild's member list in Guild Create events.

pub fn presence(&self) -> Option<&UpdateStatusInfo>[src]

Return an immutable reference to the presence to set when identifying with the gateway.

This will be the bot's presence. For example, setting the online status to Do Not Disturb will show the status in the bot's presence.

pub fn shard(&self) -> [u64; 2][src]

The shard's ID and the total number of shards used by the bot.

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

Return an immutable reference to the token used to authenticate with when identifying with the gateway.

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

Auto Trait Implementations

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,