Trait ParseableKey

Source
pub trait ParseableKey:
    Sized
    + ToPublicKey
    + Sealed {
    // Required method
    fn from_slice(sl: &[u8]) -> Result<Self, KeyParseError>;
}
Expand description

Trait for parsing keys from byte slices

Required Methods§

Source

fn from_slice(sl: &[u8]) -> Result<Self, KeyParseError>

Parse a key from slice

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ParseableKey for PublicKey

Source§

impl ParseableKey for XOnlyPublicKey

Implementors§