Trait bls_signatures::Serialize

source ·
pub trait Serialize: Debug + Sized {
    // Required methods
    fn write_bytes(&self, dest: &mut impl Write) -> Result<()>;
    fn from_bytes(raw: &[u8]) -> Result<Self, Error>;

    // Provided method
    fn as_bytes(&self) -> Vec<u8> { ... }
}

Required Methods§

source

fn write_bytes(&self, dest: &mut impl Write) -> Result<()>

Writes the key to the given writer.

source

fn from_bytes(raw: &[u8]) -> Result<Self, Error>

Recreate the key from bytes in the same form as write_bytes produced.

Provided Methods§

source

fn as_bytes(&self) -> Vec<u8>

Object Safety§

This trait is not object safe.

Implementors§