[][src]Struct twilight_gateway::shard::config::ShardConfig

pub struct ShardConfig { /* fields omitted */ }

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

Use ShardConfig::builder to start creating a configuration.

Implementations

impl ShardConfig[src]

pub fn builder(token: impl Into<String>) -> ShardConfigBuilder[src]

Creates a new builder to create a config.

This is equivalent to calling ShardConfigBuilder::new directly.

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

Returns the twilight_http client to be used by the shard.

pub fn intents(&self) -> Option<&GatewayIntents>[src]

Returns the intents that the gateway is using.

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

The maximum threshold at which point the gateway will stop sending a guild's member list.

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

The presence to set when connecting to the gateway.

This will be the bot's presence. For example, setting an activity in the presence will show the activity in the bot's status.

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]

The token used to authenticate with when identifying with the gateway.

Trait Implementations

impl Clone for ShardConfig[src]

impl Debug for ShardConfig[src]

impl From<ShardConfigBuilder> for ShardConfig[src]

impl<T: Into<String>> From<T> for ShardConfig[src]

Auto Trait Implementations

impl !RefUnwindSafe for ShardConfig

impl Send for ShardConfig

impl Sync for ShardConfig

impl Unpin for ShardConfig

impl !UnwindSafe for ShardConfig

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