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.

Required Methods

Encode an object with a well-defined format, should only ever error if the underlying Encoder errors.

The only errors returned are errors propagated from the writer.

Implementations on Foreign Types

Implementors