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§
sourcefn write_bytes(&self, dest: &mut impl Write) -> Result<()>
fn write_bytes(&self, dest: &mut impl Write) -> Result<()>
Writes the key to the given writer.
sourcefn from_bytes(raw: &[u8]) -> Result<Self, Error>
fn from_bytes(raw: &[u8]) -> Result<Self, Error>
Recreate the key from bytes in the same form as write_bytes
produced.
Provided Methods§
Object Safety§
This trait is not object safe.