pub enum Error {
Internal(String),
Io(Error),
Protobuf(Error),
Serialization(Error),
Parsing(String),
Dns(InvalidDnsNameError),
Tls(Error),
Namespace(String),
}
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(Error)
This variant includes everything related to the network connection.
Protobuf(Error)
This variant includes all possible errors that come from Protobuf layer.
Serialization(Error)
Errors with JSON (de)serialization of incoming and outgoing messages.
Parsing(String)
Errors parsing messages (valid JSON but bad semantics)
Dns(InvalidDnsNameError)
This variant is used to indicate invalid DNS name used to connect to Cast device.
Tls(Error)
This variant includes any error that comes from rustls.
Namespace(String)
Problems with given namespace
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
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<Error> for Error
impl From<Error> for Error
source§fn from(err: SerializationError) -> Error
fn from(err: SerializationError) -> Error
Converts to this type from the input type.
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(err: ProtobufError) -> Error
fn from(err: ProtobufError) -> Error
Converts to this type from the input type.
source§impl From<InvalidDnsNameError> for Error
impl From<InvalidDnsNameError> for Error
source§fn from(err: InvalidDnsNameError) -> Error
fn from(err: InvalidDnsNameError) -> 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