#[non_exhaustive]pub enum JoinError {
Dropped,
NoSender,
NoCall,
TimedOut,
Driver(ConnectionError),
Serenity(Box<TrySendError<ShardRunnerMessage>>),
Twilight(ChannelError),
}
Expand description
Error returned when a manager or call handler is unable to send messages over Discord’s gateway.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dropped
Request to join was dropped, cancelled, or replaced.
NoSender
No available gateway connection was provided to send voice state update messages.
NoCall
Tried to leave a Call
which was not found.
TimedOut
Connection details were not received from Discord in the
time given in the Call
’s configuration.
This can occur if a message is lost by the Discord client between restarts, or if Discord’s gateway believes that this bot is still in the channel it attempts to join.
Users should leave
the server on the gateway before
re-attempting connection.
Driver(ConnectionError)
The driver failed to establish a voice connection.
Users should leave
the server on the gateway before
re-attempting connection.
Serenity(Box<TrySendError<ShardRunnerMessage>>)
Serenity-specific WebSocket send error.
Twilight(ChannelError)
Twilight-specific WebSocket send error when a message fails to send over websocket.
Implementations§
Source§impl JoinError
impl JoinError
Sourcepub fn should_leave_server(&self) -> bool
pub fn should_leave_server(&self) -> bool
Indicates whether this failure may have left (or been caused by) Discord’s gateway state being in an inconsistent state.
Failure to leave
before rejoining may cause further
timeouts.
Sourcepub fn should_reconnect_driver(&self) -> bool
pub fn should_reconnect_driver(&self) -> bool
Indicates whether this failure can be reattempted via
Driver::connect
with retreived connection info.
Failure to leave
before rejoining may cause further
timeouts.
Trait Implementations§
Source§impl Error for JoinError
impl Error for JoinError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Box<TrySendError<ShardRunnerMessage>>> for JoinError
impl From<Box<TrySendError<ShardRunnerMessage>>> for JoinError
Source§fn from(e: Box<TrySendError<ShardRunnerMessage>>) -> Self
fn from(e: Box<TrySendError<ShardRunnerMessage>>) -> Self
Auto Trait Implementations§
impl !Freeze for JoinError
impl !RefUnwindSafe for JoinError
impl Send for JoinError
impl Sync for JoinError
impl Unpin for JoinError
impl !UnwindSafe for JoinError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.