[][src]Trait spice21int::SpProto

pub trait SpProto: Message + Sized + Default {
    pub fn to_bytes(&self) -> Vec<u8> { ... }
pub fn from_bytes(bytes: &[u8]) -> Result<Self, DecodeError> { ... } }

SpProto Custom Message Trait

Largely an extension of prost::Message, derived for each Spice21 Message type.

Provided methods

pub fn to_bytes(&self) -> Vec<u8>[src]

Encode into Byte-Vector

pub fn from_bytes(bytes: &[u8]) -> Result<Self, DecodeError>[src]

Decode from byte array/vector

Loading content...

Implementors

Loading content...