Trait serai_coordinator::p2p::ReadWrite

source ·
pub(crate) trait ReadWrite: Sized {
    // Required methods
    fn read<R>(reader: &mut R) -> Result<Self, Error>
       where R: Read;
    fn write<W>(&self, writer: &mut W) -> Result<(), Error>
       where W: Write;

    // Provided method
    fn serialize(&self) -> Vec<u8>  { ... }
}
Expand description

An item which can be read and written.

Required Methods§

source

fn read<R>(reader: &mut R) -> Result<Self, Error>
where R: Read,

source

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write,

Provided Methods§

source

fn serialize(&self) -> Vec<u8>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ReadWrite for TendermintTx

source§

impl ReadWrite for serai_coordinator::tributary::transaction::Transaction

source§

impl ReadWrite for BlockHeader

source§

impl ReadWrite for ProvidedTransaction

source§

impl ReadWrite for SignedTransaction

source§

impl ReadWrite for Signed

source§

impl<T> ReadWrite for tributary_chain::Transaction<T>
where T: Transaction,

source§

impl<T> ReadWrite for Block<T>
where T: Transaction,