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§

Implementations on Foreign Types§

Source§

impl BinaryEncodable for &str

Source§

impl BinaryEncodable for &[u8]

Source§

impl BinaryEncodable for bool

Source§

impl BinaryEncodable for i64

Source§

impl BinaryEncodable for u64

Implementation for basic types

Source§

impl BinaryEncodable for String

Source§

impl BinaryEncodable for Vec<u8>

Source§

impl BinaryEncodable for [u8; 32]

Implementors§