Enum safe_network::messaging::Error
source · [−]#[non_exhaustive]
pub enum Error {
Serialisation(String),
FailedToParse(String),
InvalidSignature,
UnsupportedVersion(u16),
}
Expand description
Errors that can occur when interacting with messaging APIs.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Serialisation(String)
An error occurred when serializing a message.
FailedToParse(String)
Failed to parse a message.
The String
will be a human-readable indication of the problem with the message.
InvalidSignature
Signature verification failed.
Wherever possible, signatures are verified when deserialising messages. This error is returned when deserialisation succeeded but the signature was invalid.
UnsupportedVersion(u16)
Message read was built with an unsupported version.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more