Skip to main content

NyarCodec

Trait NyarCodec 

Source
pub trait NyarCodec: Sized {
    // Required methods
    fn encode(
        &self,
        writer: &mut BinaryWriter<Vec<u8>, Leb128>,
    ) -> Result<(), GaiaError>;
    fn decode(
        reader: &mut BinaryReader<Cursor<&[u8]>, Leb128>,
    ) -> Result<Self, GaiaError>;
}
Expand description

Codec trait for Nyar instructions

Required Methods§

Source

fn encode( &self, writer: &mut BinaryWriter<Vec<u8>, Leb128>, ) -> Result<(), GaiaError>

Encode to binary stream

Source

fn decode( reader: &mut BinaryReader<Cursor<&[u8]>, Leb128>, ) -> Result<Self, GaiaError>

Decode from binary stream

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§