cuprate_epee_encoding

Trait EpeeObject

Source
pub trait EpeeObject: Sized {
    type Builder: EpeeObjectBuilder<Self>;

    // Required methods
    fn number_of_fields(&self) -> u64;
    fn write_fields<B: BufMut>(self, w: &mut B) -> Result<()>;
}
Expand description

A trait for an object that can be turned into epee bytes.

Required Associated Types§

Required Methods§

Source

fn number_of_fields(&self) -> u64

Returns the number of fields to be encoded.

Source

fn write_fields<B: BufMut>(self, w: &mut B) -> Result<()>

write the objects fields into the writer.

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.

Implementors§