WriteToBuf

Trait WriteToBuf 

Source
pub trait WriteToBuf {
    // Required method
    fn to_vec(&self) -> RpcResult<Vec<u8>>;
}
Expand description

Allow any type to be written to a Capnproto message buffer

On a qrpc bus, a service exposes its API via an -sdk crate (for example libqaul-sdk), paired with a -type crate (such as libqaul-types). In order to cut down on potential boilerplate in converting between the networking types and the internal library types this trait is meant to facilitate the transformation.

Required Methods§

Source

fn to_vec(&self) -> RpcResult<Vec<u8>>

Take an instance object and turn it into a packed byte buffer

Implementors§