Trait BytesEncoding

Source
pub trait BytesEncoding: Sized {
    // Required methods
    fn to_bytes(&self) -> Vec<u8> ;
    fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
}

Required Methods§

Source

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

Source

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

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.

Implementations on Foreign Types§

Source§

impl BytesEncoding for W3fBls377Public

Source§

impl BytesEncoding for W3fBls377Secret

Source§

impl BytesEncoding for W3fBls377Signature

Source§

impl BytesEncoding for W3fBls381Public

Source§

impl BytesEncoding for W3fBls381Secret

Source§

impl BytesEncoding for W3fBls381Signature

Source§

impl BytesEncoding for ArkBlsBn254Public

Source§

impl BytesEncoding for ArkBlsBn254Secret

Source§

impl BytesEncoding for ArkBlsBn254Signature

Source§

impl BytesEncoding for Ed25519Signature

Source§

impl BytesEncoding for Ed25519SigningKey

Source§

impl BytesEncoding for Ed25519VerificationKey

Source§

impl BytesEncoding for K256Signature

Source§

impl BytesEncoding for K256SigningKey

Source§

impl BytesEncoding for K256VerifyingKey

Source§

impl BytesEncoding for SpEcdsaPair

Source§

impl BytesEncoding for SpEcdsaPublic

Source§

impl BytesEncoding for SpEcdsaSignature

Source§

impl BytesEncoding for SpEd25519Pair

Source§

impl BytesEncoding for SpEd25519Public

Source§

impl BytesEncoding for SpEd25519Signature

Source§

impl BytesEncoding for SpSr25519Pair

Source§

impl BytesEncoding for SpSr25519Public

Source§

impl BytesEncoding for SpSr25519Signature

Source§

impl BytesEncoding for SchnorrkelPublic

Source§

impl BytesEncoding for SchnorrkelSecret

Source§

impl BytesEncoding for SchnorrkelSignature

Implementors§