Trait WireValue

Source
pub trait WireValue:
    Copy
    + PartialEq
    + Debug
    + Serialize {
    // Required methods
    fn is_zero(&self) -> bool;
    fn to_le_bytes(&self) -> [u8; 8];
}
Expand description

Implemented for acceptable types to use as wire values. It would be nice if this could just be a set of required traits, but num_traits::is_zero isn’t implemented for bool.

Required Methods§

Source

fn is_zero(&self) -> bool

Source

fn to_le_bytes(&self) -> [u8; 8]

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 WireValue for bool

Source§

fn is_zero(&self) -> bool

Source§

fn to_le_bytes(&self) -> [u8; 8]

Source§

impl WireValue for u64

Source§

fn is_zero(&self) -> bool

Source§

fn to_le_bytes(&self) -> [u8; 8]

Implementors§