#[non_exhaustive]pub enum PeerKeyError {
EmptyKey,
EmptyAlgorithm,
WrongKeyLength {
algorithm: String,
expected: usize,
actual: usize,
},
}Expand description
Why a PeerKey failed to construct or deserialize.
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.
EmptyKey
Zero-length key bytes — a binding to nothing is never meaningful.
EmptyAlgorithm
An Other label with no characters in it.
WrongKeyLength
The algorithm names a fixed key length and the bytes don’t match it.
Trait Implementations§
Source§impl Clone for PeerKeyError
impl Clone for PeerKeyError
Source§fn clone(&self) -> PeerKeyError
fn clone(&self) -> PeerKeyError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeerKeyError
impl Debug for PeerKeyError
Source§impl Display for PeerKeyError
impl Display for PeerKeyError
impl Eq for PeerKeyError
Source§impl Error for PeerKeyError
impl Error for PeerKeyError
1.30.0 · 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 PartialEq for PeerKeyError
impl PartialEq for PeerKeyError
impl StructuralPartialEq for PeerKeyError
Auto Trait Implementations§
impl Freeze for PeerKeyError
impl RefUnwindSafe for PeerKeyError
impl Send for PeerKeyError
impl Sync for PeerKeyError
impl Unpin for PeerKeyError
impl UnsafeUnpin for PeerKeyError
impl UnwindSafe for PeerKeyError
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