#[non_exhaustive]pub enum PublicKeyError {
Hex(HexError),
InvalidLength(usize),
InvalidPoint,
}Expand description
Errors raised when constructing a PublicKey.
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.
Hex(HexError)
The hex representation could not be decoded.
InvalidLength(usize)
The byte slice was not exactly PUBLIC_KEY_SIZE long.
InvalidPoint
The bytes did not encode a valid x-only point on secp256k1.
Trait Implementations§
Source§impl Clone for PublicKeyError
impl Clone for PublicKeyError
Source§fn clone(&self) -> PublicKeyError
fn clone(&self) -> PublicKeyError
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 moreimpl Copy for PublicKeyError
Source§impl Debug for PublicKeyError
impl Debug for PublicKeyError
Source§impl Display for PublicKeyError
impl Display for PublicKeyError
Source§impl Error for PublicKeyError
impl Error for PublicKeyError
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 From<HexError> for PublicKeyError
impl From<HexError> for PublicKeyError
Source§impl From<PublicKeyError> for CoordinateError
impl From<PublicKeyError> for CoordinateError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for ContactListError
impl From<PublicKeyError> for ContactListError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for ThreadError
impl From<PublicKeyError> for ThreadError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for FromBech32Error
impl From<PublicKeyError> for FromBech32Error
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for CommentError
impl From<PublicKeyError> for CommentError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for DelegationError
impl From<PublicKeyError> for DelegationError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for GroupError
impl From<PublicKeyError> for GroupError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for LabelError
impl From<PublicKeyError> for LabelError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for Nip34Error
impl From<PublicKeyError> for Nip34Error
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for Nip46Error
Available on crate feature nip46 only.
impl From<PublicKeyError> for Nip46Error
Available on crate feature
nip46 only.Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for CalendarError
impl From<PublicKeyError> for CalendarError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for LiveError
impl From<PublicKeyError> for LiveError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for WikiError
impl From<PublicKeyError> for WikiError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for ReportError
impl From<PublicKeyError> for ReportError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for Nip61Error
Available on crate feature nip44 only.
impl From<PublicKeyError> for Nip61Error
Available on crate feature
nip44 only.Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for PictureError
impl From<PublicKeyError> for PictureError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for VideoError
impl From<PublicKeyError> for VideoError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for HighlightError
impl From<PublicKeyError> for HighlightError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for ManagementError
impl From<PublicKeyError> for ManagementError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for Nip90Error
impl From<PublicKeyError> for Nip90Error
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for PublicMessageError
impl From<PublicKeyError> for PublicMessageError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Source§impl From<PublicKeyError> for ChatError
impl From<PublicKeyError> for ChatError
Source§fn from(source: PublicKeyError) -> Self
fn from(source: PublicKeyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PublicKeyError
impl RefUnwindSafe for PublicKeyError
impl Send for PublicKeyError
impl Sync for PublicKeyError
impl Unpin for PublicKeyError
impl UnsafeUnpin for PublicKeyError
impl UnwindSafe for PublicKeyError
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