Struct twilight_gateway_queue::LargeBotQueue
source · pub struct LargeBotQueue { /* private fields */ }
Available on crate feature
twilight-http
only.Expand description
Queue built for single-process groups of shards that require identifying via Sharding for Large Bots.
Usage with other processes will cause inconsistencies between each process’s ratelimit buckets. If using multiple processes for shard groups, then refer to the module-level documentation.
Implementations§
source§impl LargeBotQueue
impl LargeBotQueue
sourcepub async fn new(buckets: usize, http: Arc<Client>) -> Self
pub async fn new(buckets: usize, http: Arc<Client>) -> Self
Create a new large bot queue.
You must provide the number of buckets Discord requires your bot to connect with.
The number of buckets is provided via Discord as max_concurrency
which can be fetched with Client::gateway
.
Panics
Panics if retrieving the session start limints fails.
Trait Implementations§
source§impl Debug for LargeBotQueue
impl Debug for LargeBotQueue
source§impl Queue for LargeBotQueue
impl Queue for LargeBotQueue
Auto Trait Implementations§
impl !RefUnwindSafe for LargeBotQueue
impl Send for LargeBotQueue
impl Sync for LargeBotQueue
impl Unpin for LargeBotQueue
impl !UnwindSafe for LargeBotQueue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more