ContractSerialize

Trait ContractSerialize 

Source
pub trait ContractSerialize: Sized {
    // Required methods
    fn serialize_to_contract_form(&self) -> Result<Vec<u8>, BLSError>;
    fn deserialize_from_contract_form(bytes: &[u8]) -> Result<Self, BLSError>;
}

Required Methods§

Source

fn serialize_to_contract_form(&self) -> Result<Vec<u8>, BLSError>

Serialize the group element into a byte vector.

Source

fn deserialize_from_contract_form(bytes: &[u8]) -> Result<Self, BLSError>

Deserialize the group element from a byte vector.

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§