pub trait Queue: Debug + Send + Sync {
    // Required method
    fn request<'a>(
        &'a self,
        shard_id: [u64; 2]
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
}
Expand description

Queue for shards to request the ability to initialize new sessions with the gateway.

This will usually only need to be implemented when you have a multi-process sharding setup. Refer to the module-level documentation for more information.

Required Methods§

source

fn request<'a>( &'a self, shard_id: [u64; 2] ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>

A shard has requested the ability to request a session initialization with the gateway.

The returned future must resolve only when the shard can initiate the session.

Implementors§

source§

impl Queue for LargeBotQueue

Available on crate feature twilight-http only.
source§

impl Queue for LocalQueue

source§

impl Queue for NoOpQueue