Trait qrpc_sdk::io::WriteToBuf[][src]

pub trait WriteToBuf {
    fn to_vec(&self) -> RpcResult<Vec<u8>>;
}

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

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

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

Loading content...

Implementors

Loading content...