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§
fn encode_binary(&self) -> Result<Vec<u8>, EncodingError>
Implementations on Foreign Types§
Source§impl BinaryEncodable for &str
impl BinaryEncodable for &str
fn encode_binary(&self) -> Result<Vec<u8>, EncodingError>
Source§impl BinaryEncodable for &[u8]
impl BinaryEncodable for &[u8]
fn encode_binary(&self) -> Result<Vec<u8>, EncodingError>
Source§impl BinaryEncodable for bool
impl BinaryEncodable for bool
fn encode_binary(&self) -> Result<Vec<u8>, EncodingError>
Source§impl BinaryEncodable for i64
impl BinaryEncodable for i64
fn encode_binary(&self) -> Result<Vec<u8>, EncodingError>
Source§impl BinaryEncodable for u64
Implementation for basic types
impl BinaryEncodable for u64
Implementation for basic types