[−][src]Struct twilight_gateway_queue::LocalQueue
A local, in-process implementation of a Queue
which manages the
connection attempts of one or more shards.
The queue will take incoming requests and then queue them, releasing one of the requests every 6 seconds. The queue is necessary because there's a ratelimit on how often shards can initiate sessions.
You usually won't need to handle this yourself, because the Cluster
will
do that for you when managing multiple shards.
When not to use this
This queue implementation is "local", meaning it's intended to be used if you manage shards only in this process. If you run shards in multiple different processes (do you utilize microservices a lot?), then you must not use this implementation. Shards across multiple processes may create new sessions at the same time, which is bad.
It should also not be used for very large sharding, for that the
LargeBotQueue
can be used.
If you can't use this, look into an alternative implementation of the
Queue
, such as the gateway-queue
broker.
Implementations
impl LocalQueue
[src]
Trait Implementations
impl Clone for LocalQueue
[src]
pub fn clone(&self) -> LocalQueue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LocalQueue
[src]
impl Default for LocalQueue
[src]
impl Queue for LocalQueue
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LocalQueue
[src]
impl Send for LocalQueue
[src]
impl Sync for LocalQueue
[src]
impl Unpin for LocalQueue
[src]
impl !UnwindSafe for LocalQueue
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,