pub enum Error {
Show 17 variants
InvalidEnr,
UnknownPublicKey,
KeyTypeNotSupported(&'static str),
KeyDerivationFailed,
InvalidRemotePublicKey,
InvalidSecretKey,
InvalidChallengeSignature(Challenge),
ServiceChannelClosed,
ServiceNotStarted,
ServiceAlreadyStarted,
SessionNotEstablished,
RLPError(Error),
EncryptionFail(String),
DecryptionFailed(String),
Custom(&'static str),
Error(String),
Io(Error),
}
Expand description
A general error that is used throughout the Discv5 library.
Variants§
InvalidEnr
An invalid ENR was received.
UnknownPublicKey
The public key type is known.
KeyTypeNotSupported(&'static str)
The ENR key used is not supported.
KeyDerivationFailed
Failed to derive an ephemeral public key.
InvalidRemotePublicKey
The remote’s public key was invalid.
InvalidSecretKey
The secret key does not match the provided ENR.
InvalidChallengeSignature(Challenge)
An invalid signature was received for a challenge.
ServiceChannelClosed
The Service channel has been closed early.
ServiceNotStarted
The discv5 service is not running.
ServiceAlreadyStarted
The service has is already running.
SessionNotEstablished
A session could not be established with the remote.
RLPError(Error)
An RLP decoding error occurred.
EncryptionFail(String)
Failed to encrypt a message.
DecryptionFailed(String)
Failed to decrypt a message.
Custom(&'static str)
The custom error has occurred.
Error(String)
A generic dynamic error occurred.
Io(Error)
An IO error occurred.
Trait Implementations§
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