pub trait Encodable: Sealed {
fn consensus_encode<W: Write>(&self, writer: &mut W) -> Result<usize, Error>;
}
Expand description
Data which can be encoded in a consensus-consistent way.
Sealed trait
This trait is sealed and cannot be implemented for types outside of Wownero
crate. This is
done to ensure implementations will not fail inconsistently and so unwrapping in serialize
is safe.