solana_libra_proto_conv_derive 0.0.0

Solana Libra proto_conv_derive
Documentation

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)]
#[ProtoType(ProtobufStruct)]
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.