[−][src]Struct twilight_gateway::shard::Config
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 http_client(&self) -> &Client
[src]
Return an immutable reference to the twilight_http
client to be used
by the shard.
pub fn intents(&self) -> Option<&Intents>
[src]
Return an immutable reference to 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
Auto Trait Implementations
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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>,