[−][src]Trait solana_libra_proto_conv::FromProto
Convert Protobuf struct to Rust.
Associated Types
type ProtoType
The corresponding Protobuf type.
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.
Implementations on Foreign Types
impl FromProto for u32
[src]
type ProtoType = u32
fn from_proto(object: Self::ProtoType) -> Result<Self>
[src]
impl FromProto for u64
[src]
type ProtoType = u64
fn from_proto(object: Self::ProtoType) -> Result<Self>
[src]
impl FromProto for i32
[src]
type ProtoType = i32
fn from_proto(object: Self::ProtoType) -> Result<Self>
[src]
impl FromProto for i64
[src]
type ProtoType = i64
fn from_proto(object: Self::ProtoType) -> Result<Self>
[src]
impl FromProto for bool
[src]
type ProtoType = bool
fn from_proto(object: Self::ProtoType) -> Result<Self>
[src]
impl FromProto for String
[src]
type ProtoType = String
fn from_proto(object: Self::ProtoType) -> Result<Self>
[src]
impl FromProto for Vec<u8>
[src]
impl<P, T> FromProto for Vec<T> where
P: Message,
T: FromProto<ProtoType = P>,
[src]
P: Message,
T: FromProto<ProtoType = P>,