pub trait PublicKeyExt: Sized {
type FromBytesErr;
// Required methods
fn as_bytes(&self) -> &[u8] ⓘ;
fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Self::FromBytesErr>;
fn scheme(&self) -> SignatureScheme;
// Provided method
fn to_flagged_bytes(&self) -> Vec<u8> ⓘ { ... }
}Required Associated Types§
type FromBytesErr
Required Methods§
Sourcefn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Self::FromBytesErr>
fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> Result<Self, Self::FromBytesErr>
Tries to create a PublicKey from bytes.
Sourcefn scheme(&self) -> SignatureScheme
fn scheme(&self) -> SignatureScheme
Returns the signature scheme for this public key.
Provided Methods§
Sourcefn to_flagged_bytes(&self) -> Vec<u8> ⓘ
fn to_flagged_bytes(&self) -> Vec<u8> ⓘ
Returns the bytes with signature scheme flag prepended
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.