Skip to main content

AsProtoField

Trait AsProtoField 

Source
pub trait AsProtoField {
    // Required method
    fn as_proto_field() -> FieldType;
}
Expand description

A trait that specifies the protobuf field type to which a rust type should be mapped (i.e. single, optional, repeated, map).

Automatically implemented for the types that implement AsProtoType.

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<K: AsProtoMapKey, V: AsProtoType> AsProtoField for BTreeMap<K, V>

Source§

impl<K: AsProtoMapKey, V: AsProtoType> AsProtoField for HashMap<K, V>

Source§

impl<T> AsProtoField for Option<T>
where T: AsProtoType,

Source§

impl<T: AsProtoType> AsProtoField for Vec<T>

Implementors§