[][src]Trait solana_libra_proto_conv::FromProto

pub trait FromProto: Sized {
    type ProtoType;
    fn from_proto(object: Self::ProtoType) -> Result<Self>;
}

Convert Protobuf struct to Rust.

Associated Types

type ProtoType

The corresponding Protobuf type.

Loading content...

Required methods

fn from_proto(object: Self::ProtoType) -> Result<Self>

Converts a Protobuf struct to corresponding Rust struct. The conversion could fail if the Protobuf struct is invalid. For example, the Protobuf struct could have a byte array that is intended to be a HashValue, and the conversion would fail if the byte array is not exactly 32 bytes.

Loading content...

Implementations on Foreign Types

impl FromProto for u32[src]

type ProtoType = u32

impl FromProto for u64[src]

type ProtoType = u64

impl FromProto for i32[src]

type ProtoType = i32

impl FromProto for i64[src]

type ProtoType = i64

impl FromProto for bool[src]

type ProtoType = bool

impl FromProto for String[src]

type ProtoType = String

impl FromProto for Vec<u8>[src]

type ProtoType = Vec<u8>

impl<P, T> FromProto for Vec<T> where
    P: Message,
    T: FromProto<ProtoType = P>, 
[src]

type ProtoType = RepeatedField<P>

Loading content...

Implementors

Loading content...