[][src]Trait exonum_proto::ProtobufConvert

pub trait ProtobufConvert: Sized {
    type ProtoStruct;
    fn to_pb(&self) -> Self::ProtoStruct;
fn from_pb(pb: Self::ProtoStruct) -> Result<Self, Error>; }

Used for establishing correspondence between rust struct and protobuf rust struct

Associated Types

type ProtoStruct

Type of the protobuf clone of Self

Loading content...

Required methods

fn to_pb(&self) -> Self::ProtoStruct

Struct -> ProtoStruct

fn from_pb(pb: Self::ProtoStruct) -> Result<Self, Error>

ProtoStruct -> Struct

Loading content...

Implementations on Foreign Types

impl ProtobufConvert for DateTime<Utc>[src]

impl ProtobufConvert for String[src]

type ProtoStruct = Self

impl ProtobufConvert for u16[src]

type ProtoStruct = u32

impl ProtobufConvert for i16[src]

type ProtoStruct = i32

impl<T> ProtobufConvert for Vec<T> where
    T: ProtobufConvert
[src]

type ProtoStruct = Vec<T::ProtoStruct>

impl ProtobufConvert for ()[src]

type ProtoStruct = Empty

impl ProtobufConvert for Vec<u8>[src]

Special case for protobuf bytes.

type ProtoStruct = Vec<u8>

impl<K, T, S> ProtobufConvert for HashMap<K, T, S> where
    K: Eq + Hash + Debug + Clone,
    T: ProtobufConvert,
    S: Default + BuildHasher
[src]

type ProtoStruct = HashMap<K, T::ProtoStruct, S>

impl ProtobufConvert for BitVec[src]

type ProtoStruct = BitVec

impl ProtobufConvert for bool[src]

type ProtoStruct = bool

impl ProtobufConvert for u32[src]

type ProtoStruct = u32

impl ProtobufConvert for u64[src]

type ProtoStruct = u64

impl ProtobufConvert for i32[src]

type ProtoStruct = i32

impl ProtobufConvert for i64[src]

type ProtoStruct = i64

impl ProtobufConvert for f32[src]

type ProtoStruct = f32

impl ProtobufConvert for f64[src]

type ProtoStruct = f64

impl ProtobufConvert for [u8; 8][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 16][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 24][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 32][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 40][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 48][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 56][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 64][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 72][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 80][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 88][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 96][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 104][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 112][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 120][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 128][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 160][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 256][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 512][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 1024][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

impl ProtobufConvert for [u8; 2048][src]

Special case for fixed sized arrays.

type ProtoStruct = Vec<u8>

Loading content...

Implementors

Loading content...