pub enum GatewayError {
CapacityFull {
capacity: usize,
},
MissingSession(ClientId),
SessionDisconnected {
client_id: ClientId,
since: Tick,
},
BadGeneration {
expected: u64,
actual: u64,
},
ReplayOrStale {
last_sequence: Option<u64>,
sequence: u64,
},
RateLimited {
limit: usize,
attempted: usize,
},
}Expand description
Gateway/session error.
Variants§
CapacityFull
Session table is full.
MissingSession(ClientId)
Session does not exist.
SessionDisconnected
Session is disconnected.
BadGeneration
Session reconnect generation does not match.
ReplayOrStale
Command sequence was stale or replayed.
Fields
RateLimited
Client exceeded the per-tick command admission limit.
Implementations§
Source§impl GatewayError
impl GatewayError
Sourcepub const fn command_reject_reason(&self) -> Option<CommandRejectReason>
pub const fn command_reject_reason(&self) -> Option<CommandRejectReason>
Maps gateway metadata errors into generic command reject reasons.
Trait Implementations§
Source§impl Clone for GatewayError
impl Clone for GatewayError
Source§fn clone(&self) -> GatewayError
fn clone(&self) -> GatewayError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GatewayError
Source§impl Debug for GatewayError
impl Debug for GatewayError
Source§impl Display for GatewayError
impl Display for GatewayError
impl Eq for GatewayError
Source§impl Error for GatewayError
impl Error for GatewayError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for GatewayError
impl PartialEq for GatewayError
impl StructuralPartialEq for GatewayError
Auto Trait Implementations§
impl Freeze for GatewayError
impl RefUnwindSafe for GatewayError
impl Send for GatewayError
impl Sync for GatewayError
impl Unpin for GatewayError
impl UnsafeUnpin for GatewayError
impl UnwindSafe for GatewayError
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