pub trait ToPublicBytes {
    // Required methods
    fn public_bytes_length(&self) -> Result<usize, Error>;
    fn write_public_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>;

    // Provided method
    fn to_public_bytes(&self) -> Result<SecretBytes, Error> { ... }
}
Expand description

Object-safe trait for exporting key public bytes

Required Methods§

source

fn public_bytes_length(&self) -> Result<usize, Error>

Get the length of a public key

source

fn write_public_bytes(&self, out: &mut dyn WriteBuffer) -> Result<(), Error>

Write the key public bytes to a buffer.

Provided Methods§

source

fn to_public_bytes(&self) -> Result<SecretBytes, Error>

Available on crate feature alloc only.

Write the key public bytes to a new allocated buffer.

Implementors§