pub trait CoseKeyEncode: Sized {
// Required methods
fn encode_public(key: &PublicKey) -> Result<CoseKey, KeyEncodingError>;
fn encode_secret(key: &SecretKey) -> Result<CoseKey, KeyEncodingError>;
// Provided methods
fn encode_public_with_id(
key: &PublicKey,
id: Vec<u8>,
) -> Result<CoseKey, KeyEncodingError> { ... }
fn encode_secret_with_id(
key: &SecretKey,
id: Vec<u8>,
) -> Result<CoseKey, KeyEncodingError> { ... }
}Expand description
COSE key encoding
Required Methods§
fn encode_public(key: &PublicKey) -> Result<CoseKey, KeyEncodingError>
fn encode_secret(key: &SecretKey) -> Result<CoseKey, KeyEncodingError>
Provided Methods§
fn encode_public_with_id( key: &PublicKey, id: Vec<u8>, ) -> Result<CoseKey, KeyEncodingError>
fn encode_secret_with_id( key: &SecretKey, id: Vec<u8>, ) -> Result<CoseKey, KeyEncodingError>
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.