Skip to main content

BinaryEncodable

Trait BinaryEncodable 

Source
pub trait BinaryEncodable {
    // Required method
    fn encode_binary(&self) -> Result<Vec<u8>, EncodingError>;
}
Expand description

Trait for types that can be binary encoded for hashing

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BinaryEncodable for &[u8]

Source§

impl BinaryEncodable for &str

Source§

impl BinaryEncodable for String

Source§

impl BinaryEncodable for Vec<u8>

Source§

impl BinaryEncodable for [u8; 32]

Source§

impl BinaryEncodable for bool

Source§

impl BinaryEncodable for i64

Source§

impl BinaryEncodable for u64

Implementation for basic types

Implementors§