[][src]Trait twilight_gateway_queue::Queue

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

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 cluster setup. Refer to the module-level documentation for more information.

Required methods

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

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.

Loading content...

Implementors

impl Queue for LargeBotQueue[src]

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

Request to be able to identify with the gateway. This will place this request behind all other requests, and the returned future will resolve once the request has been completed.

impl Queue for LocalQueue[src]

pub fn request(
    &self,
    [id, total]: [u64; 2]
) -> Pin<Box<dyn Future<Output = ()> + Send>>
[src]

Request to be able to identify with the gateway. This will place this request behind all other requests, and the returned future will resolve once the request has been completed.

Loading content...