Trait NeoSerializable

Source
pub trait NeoSerializable {
    type Error: Send + Sync + Debug;

    // Required methods
    fn size(&self) -> usize;
    fn encode(&self, writer: &mut Encoder);
    fn decode(reader: &mut Decoder<'_>) -> Result<Self, Self::Error>
       where Self: Sized;
    fn to_array(&self) -> Vec<u8> ;
}

Required Associated Types§

Required Methods§

Source

fn size(&self) -> usize

Source

fn encode(&self, writer: &mut Encoder)

Source

fn decode(reader: &mut Decoder<'_>) -> Result<Self, Self::Error>
where Self: Sized,

Source

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

Implementations on Foreign Types§

Source§

impl NeoSerializable for u8

Source§

type Error = CodecError

Source§

fn size(&self) -> usize

Source§

fn encode(&self, writer: &mut Encoder)

Source§

fn decode(reader: &mut Decoder<'_>) -> Result<Self, CodecError>
where Self: Sized,

Source§

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

Implementors§