如何用Cap'n Proto模式语言表达Rust的Vec <u8>?

时间:2019-11-11 18:13:27

标签: rust capnproto

我需要使用capnproto-rust以Vec<u8>格式移动一些二进制数据,但是我不知道如何将其转换为Cap'n Proto模式语言。 我要做的是:

interface Node {

    getCsr @0 () -> (csrresponse :CsrResponse);
    register @1 (certrequest: CertRequest);
    install @2 () -> ();

    struct CsrResponse {
       csr @0: List(UInt8);
    }

    struct CertRequest {
       cert @0: List(UInt8);
       caCert @1: List(UInt8);
    }

}

我使用了List(UInt8),它似乎最接近Vec<u8>,但是我不知道如何在Rust RPC服务器实现中将Vec<u8>移到List

0 个答案:

没有答案