[−][src]Struct twilight_gateway::shard::config::ShardConfig
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]
fn clone(&self) -> ShardConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ShardConfig
[src]
impl From<ShardConfigBuilder> for ShardConfig
[src]
fn from(builder: ShardConfigBuilder) -> Self
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,