bc_components

Trait ECKeyBase

Source
pub trait ECKeyBase:
    Display
    + Debug
    + Clone
    + PartialEq
    + Eq
    + Hash {
    const KEY_SIZE: usize;

    // Required methods
    fn from_data_ref(data: impl AsRef<[u8]>) -> Result<Self>
       where Self: Sized;
    fn data(&self) -> &[u8] ;

    // Provided methods
    fn hex(&self) -> String { ... }
    fn from_hex(hex: impl AsRef<str>) -> Result<Self> { ... }
}
Expand description

A type that represents an elliptic curve digital signature algorithm (ECDSA) key.

Required Associated Constants§

Required Methods§

Source

fn from_data_ref(data: impl AsRef<[u8]>) -> Result<Self>
where Self: Sized,

Source

fn data(&self) -> &[u8]

Provided Methods§

Source

fn hex(&self) -> String

Source

fn from_hex(hex: impl AsRef<str>) -> Result<Self>

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.

Implementors§