Enum yggdrasil_keys::FromHexError
source · pub enum FromHexError {
WrongKeyLength,
Hex(FromHexError),
ConflictingPubKeys,
InvalidSigKey(SignatureError),
}
Expand description
Describe error for trying to decode yggdrasil keys from hex strings.
Variants§
WrongKeyLength
The sec_hex
parameters can be either 64 hex encoded bytes,
if they are a keypair,
or 32 hex encoded bytes if they are just the private key.
The pub_hex
parameters have to be 32 hex encoded bytes.
Hex(FromHexError)
The strings have to be valid hex.
ConflictingPubKeys
If pub_hex
is Some
and sec_hex
contains a keypair,
both supplied public keys have to be the same.
InvalidSigKey(SignatureError)
The signing keys are checked by the ed25519 implementation after parsing. If something doesn’t add up, this error will be returned.
Trait Implementations§
source§impl Debug for FromHexError
impl Debug for FromHexError
source§impl Display for FromHexError
impl Display for FromHexError
source§impl Error for FromHexError
impl Error for FromHexError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + '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 FromHexError
impl From<Error> for FromHexError
source§fn from(source: SignatureError) -> Self
fn from(source: SignatureError) -> Self
Converts to this type from the input type.
source§impl From<FromHexError> for FromHexError
impl From<FromHexError> for FromHexError
source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FromHexError
impl !RefUnwindSafe for FromHexError
impl Send for FromHexError
impl Sync for FromHexError
impl Unpin for FromHexError
impl !UnwindSafe for FromHexError
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