pub enum Error {
Show 13 variants
Io(Error),
Tls(Error),
SyncChannelClosed(RecvError),
AsyncChannelClosed,
OneShotCanceled,
InvalidConfig {
path: String,
cause: ConfigError,
},
InvalidMessage {
string: String,
cause: MessageParseError,
},
PoisonedLog,
PingTimeout,
UnknownCodec {
codec: String,
},
CodecFailed {
codec: &'static str,
data: String,
},
NoUsableNick,
StreamAlreadyConfigured,
}
Expand description
The main crate-wide error type.
Variants§
Io(Error)
An internal I/O error.
Tls(Error)
An internal TLS error.
SyncChannelClosed(RecvError)
An internal synchronous channel closed.
AsyncChannelClosed
An internal asynchronous channel closed.
OneShotCanceled
An internal oneshot channel closed.
InvalidConfig
Error for invalid configurations.
Fields
§
cause: ConfigError
The detailed configuration error.
InvalidMessage
Error for invalid messages.
Fields
§
cause: MessageParseError
The detailed message parsing error.
PoisonedLog
Mutex for a logged transport was poisoned making the log inaccessible.
PingTimeout
Ping timed out due to no response.
UnknownCodec
Failed to lookup an unknown codec.
CodecFailed
Failed to encode or decode something with the given codec.
Fields
NoUsableNick
All specified nicknames were in use or unusable.
StreamAlreadyConfigured
Stream has already been configured.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 From<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(e: ProtocolError) -> Error
fn from(e: ProtocolError) -> Error
Converts to this type from the input type.
Source§impl<T> From<TrySendError<T>> for Error
impl<T> From<TrySendError<T>> for Error
Source§fn from(_: TrySendError<T>) -> Error
fn from(_: TrySendError<T>) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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