Skip to main content

AsProtoType

Trait AsProtoType 

Source
pub trait AsProtoType {
    // Required method
    fn proto_type() -> ProtoType;
}
Expand description

A trait that specifies the protobuf type to which a rust type should be mapped.

Automatically implemented for all primitive types, as well as the targets of the proto_message, proto_oneof and proto_enum macros, and all the types exported from the proto-types crate.

Required Methods§

Source

fn proto_type() -> ProtoType

The protobuf type to which this rust type should be mapped.

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 AsProtoType for CalendarPeriod

Available on crate feature common-types only.
Source§

impl AsProtoType for DayOfWeek

Available on crate feature common-types only.
Source§

impl AsProtoType for Month

Available on crate feature common-types only.
Source§

impl AsProtoType for Code

Source§

impl AsProtoType for bool

Source§

impl AsProtoType for f32

Source§

impl AsProtoType for f64

Source§

impl AsProtoType for i32

Source§

impl AsProtoType for i64

Source§

impl AsProtoType for u32

Source§

impl AsProtoType for u64

Source§

impl AsProtoType for ()

Source§

impl AsProtoType for String

Source§

impl AsProtoType for Vec<u8>

Source§

impl AsProtoType for Color

Available on crate feature common-types only.
Source§

impl AsProtoType for Date

Available on crate feature common-types only.
Source§

impl AsProtoType for DateTime

Available on crate feature common-types only.
Source§

impl AsProtoType for Decimal

Available on crate feature common-types only.
Source§

impl AsProtoType for Expr

Available on crate feature common-types only.
Source§

impl AsProtoType for Fraction

Available on crate feature common-types only.
Source§

impl AsProtoType for Interval

Available on crate feature common-types only.
Source§

impl AsProtoType for LatLng

Available on crate feature common-types only.
Source§

impl AsProtoType for LocalizedText

Available on crate feature common-types only.
Source§

impl AsProtoType for Money

Available on crate feature common-types only.
Source§

impl AsProtoType for PhoneNumber

Available on crate feature common-types only.
Source§

impl AsProtoType for PostalAddress

Available on crate feature common-types only.
Source§

impl AsProtoType for Quaternion

Available on crate feature common-types only.
Source§

impl AsProtoType for TimeOfDay

Available on crate feature common-types only.
Source§

impl AsProtoType for TimeZone

Available on crate feature common-types only.
Source§

impl AsProtoType for Empty

Source§

impl AsProtoType for Any

Source§

impl AsProtoType for Duration

Source§

impl AsProtoType for FieldMask

Source§

impl AsProtoType for Timestamp

Source§

impl AsProtoType for FieldViolation

Available on crate feature rpc-types only.
Source§

impl AsProtoType for Violation

Available on crate feature rpc-types only.
Source§

impl AsProtoType for Violation

Available on crate feature rpc-types only.
Source§

impl AsProtoType for BadRequest

Available on crate feature rpc-types only.
Source§

impl AsProtoType for DebugInfo

Available on crate feature rpc-types only.
Source§

impl AsProtoType for ErrorInfo

Available on crate feature rpc-types only.
Source§

impl AsProtoType for Help

Available on crate feature rpc-types only.
Source§

impl AsProtoType for HttpHeader

Available on crate feature rpc-types only.
Source§

impl AsProtoType for HttpRequest

Available on crate feature rpc-types only.
Source§

impl AsProtoType for HttpResponse

Available on crate feature rpc-types only.
Source§

impl AsProtoType for LocalizedMessage

Available on crate feature rpc-types only.
Source§

impl AsProtoType for PreconditionFailure

Available on crate feature rpc-types only.
Source§

impl AsProtoType for QuotaFailure

Available on crate feature rpc-types only.
Source§

impl AsProtoType for RequestInfo

Available on crate feature rpc-types only.
Source§

impl AsProtoType for ResourceInfo

Available on crate feature rpc-types only.
Source§

impl AsProtoType for RetryInfo

Available on crate feature rpc-types only.
Source§

impl AsProtoType for Status

Implementors§