[][src]Crate solana_libra_proto_conv_derive

The FromProto and IntoProto macros provide an easy way to convert Rust struct to corresponding Protobuf struct, or vice versa. For example:

#[derive(FromProto, IntoProto)]
struct RustStruct {
    field1: Field1,
    field2: Field2,
    fieldn: FieldN,

It requires that all fields (Field1, Field2, ..., FieldN) implement FromProto trait if we want to derive FromProto for RustStruct. Same for IntoProto trait.

Derive Macros