[][src]Struct twilight_gateway::cluster::config::ClusterConfig

pub struct ClusterConfig { /* fields omitted */ }
[]

Built configuration to be used for creating a Cluster.

Implementations

impl ClusterConfig[src][]

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

Creates a new builder to create a config.

This is equivalent to calling ClusterConfigBuilder::new directly.

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

Returns the twilight_http client used by the cluster and shards to get the gateway information.

Refer to ClusterConfigBuilder::http_client for the default value.

pub fn shard_config(&self) -> &ShardConfig[src][]

Returns the configuration used to create shards.

Refer to shard::config::ClusterConfigBuilder's methods for the default values.

pub fn shard_scheme(&self) -> ShardScheme[src][]

Returns the shard scheme used to start shards.

Refer to ClusterConfigBuilder::shard_scheme for the default value.

pub fn queue(&self) -> &Arc<Box<dyn Queue>>[src]

pub fn resume_sessions(&self) -> &HashMap<u64, ResumeSession>[src][]

Returns the resume data to resume shards for this cluster

Refer to ClusterConfigBuilder::resume_sessions for the default value.

Trait Implementations

impl Debug for ClusterConfig[src][+]

impl From<ClusterConfigBuilder> for ClusterConfig[src][+]

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

Auto Trait Implementations

impl !RefUnwindSafe for ClusterConfig

impl Send for ClusterConfig

impl Sync for ClusterConfig

impl Unpin for ClusterConfig

impl !UnwindSafe for ClusterConfig

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, 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>, 
[+]