pub enum Error {
Internal(String),
Io(IoError),
Protobuf(ProtobufError),
Serialization(SerializationError),
Ssl(SslError),
}
Expand description
Consolidates possible error types that can occur in the lib.
Variants
Internal(String)
This variant is used when error occurs in the lib logic.
Io(IoError)
This variant includes everything related to the network connection.
Protobuf(ProtobufError)
This variant includes all possible errors that come from Protobuf layer.
Serialization(SerializationError)
This variant includes everything related to (de)serialization of incoming and outgoing messages.
Ssl(SslError)
This variant includes any error that comes from OpenSSL.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<Error> for Error
impl From<Error> for Error
sourcefn from(err: SerializationError) -> Error
fn from(err: SerializationError) -> Error
Performs the conversion.
sourceimpl From<ErrorStack> for Error
impl From<ErrorStack> for Error
sourcefn from(err: ErrorStack) -> Error
fn from(err: ErrorStack) -> Error
Performs the conversion.
sourceimpl From<HandshakeError<TcpStream>> for Error
impl From<HandshakeError<TcpStream>> for Error
sourcefn from(err: HandshakeError<TcpStream>) -> Error
fn from(err: HandshakeError<TcpStream>) -> Error
Performs the conversion.
sourceimpl From<ProtobufError> for Error
impl From<ProtobufError> for Error
sourcefn from(err: ProtobufError) -> Error
fn from(err: ProtobufError) -> Error
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more