pub enum Error<T: Transport, L: LoginCredentials> {
ConnectError(Arc<T::ConnectError>),
ConnectTimeout,
IncomingError(Arc<T::IncomingError>),
OutgoingError(Arc<T::OutgoingError>),
IRCParseError(IRCParseError),
LoginError(Arc<L::Error>),
ReconnectCmd,
PingTimeout,
RemoteUnexpectedlyClosedConnection,
}
Expand description
Errors that can occur while trying to execute some action on a TwitchIRCClient
.
Variants§
ConnectError(Arc<T::ConnectError>)
Underlying transport failed to connect
ConnectTimeout
Underlying transport failed to connect in time
IncomingError(Arc<T::IncomingError>)
Error received from incoming stream of messages
OutgoingError(Arc<T::OutgoingError>)
Error received while trying to send message(s) out
IRCParseError(IRCParseError)
Incoming message was not valid IRC
LoginError(Arc<L::Error>)
Failed to get login credentials to log in with
ReconnectCmd
Received RECONNECT command by IRC server
PingTimeout
Did not receive a PONG back after sending PING
RemoteUnexpectedlyClosedConnection
Remote server unexpectedly closed connection
Trait Implementations§
Source§impl<T: Transport, L: LoginCredentials> Error for Error<T, L>
impl<T: Transport, L: LoginCredentials> Error for Error<T, L>
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()
Auto Trait Implementations§
impl<T, L> Freeze for Error<T, L>
impl<T, L> RefUnwindSafe for Error<T, L>where
<T as Transport>::ConnectError: RefUnwindSafe,
<T as Transport>::IncomingError: RefUnwindSafe,
<T as Transport>::OutgoingError: RefUnwindSafe,
<L as LoginCredentials>::Error: RefUnwindSafe,
impl<T, L> Send for Error<T, L>
impl<T, L> Sync for Error<T, L>
impl<T, L> Unpin for Error<T, L>
impl<T, L> UnwindSafe for Error<T, L>where
<T as Transport>::ConnectError: RefUnwindSafe,
<T as Transport>::IncomingError: RefUnwindSafe,
<T as Transport>::OutgoingError: RefUnwindSafe,
<L as LoginCredentials>::Error: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more