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§
Sourcefn proto_type() -> ProtoType
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.
impl AsProtoType for CalendarPeriod
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for DayOfWeek
Available on crate feature common-types only.
impl AsProtoType for DayOfWeek
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Month
Available on crate feature common-types only.
impl AsProtoType for Month
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Code
impl AsProtoType for Code
fn proto_type() -> ProtoType
Source§impl AsProtoType for bool
impl AsProtoType for bool
fn proto_type() -> ProtoType
Source§impl AsProtoType for f32
impl AsProtoType for f32
fn proto_type() -> ProtoType
Source§impl AsProtoType for f64
impl AsProtoType for f64
fn proto_type() -> ProtoType
Source§impl AsProtoType for i32
impl AsProtoType for i32
fn proto_type() -> ProtoType
Source§impl AsProtoType for i64
impl AsProtoType for i64
fn proto_type() -> ProtoType
Source§impl AsProtoType for u32
impl AsProtoType for u32
fn proto_type() -> ProtoType
Source§impl AsProtoType for u64
impl AsProtoType for u64
fn proto_type() -> ProtoType
Source§impl AsProtoType for ()
impl AsProtoType for ()
fn proto_type() -> ProtoType
Source§impl AsProtoType for String
impl AsProtoType for String
fn proto_type() -> ProtoType
Source§impl AsProtoType for Vec<u8>
impl AsProtoType for Vec<u8>
fn proto_type() -> ProtoType
Source§impl AsProtoType for Color
Available on crate feature common-types only.
impl AsProtoType for Color
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Date
Available on crate feature common-types only.
impl AsProtoType for Date
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for DateTime
Available on crate feature common-types only.
impl AsProtoType for DateTime
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Decimal
Available on crate feature common-types only.
impl AsProtoType for Decimal
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Expr
Available on crate feature common-types only.
impl AsProtoType for Expr
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Fraction
Available on crate feature common-types only.
impl AsProtoType for Fraction
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Interval
Available on crate feature common-types only.
impl AsProtoType for Interval
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for LatLng
Available on crate feature common-types only.
impl AsProtoType for LatLng
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for LocalizedText
Available on crate feature common-types only.
impl AsProtoType for LocalizedText
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Money
Available on crate feature common-types only.
impl AsProtoType for Money
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for PhoneNumber
Available on crate feature common-types only.
impl AsProtoType for PhoneNumber
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for PostalAddress
Available on crate feature common-types only.
impl AsProtoType for PostalAddress
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Quaternion
Available on crate feature common-types only.
impl AsProtoType for Quaternion
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for TimeOfDay
Available on crate feature common-types only.
impl AsProtoType for TimeOfDay
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for TimeZone
Available on crate feature common-types only.
impl AsProtoType for TimeZone
Available on crate feature
common-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Empty
impl AsProtoType for Empty
fn proto_type() -> ProtoType
Source§impl AsProtoType for Any
impl AsProtoType for Any
fn proto_type() -> ProtoType
Source§impl AsProtoType for Duration
impl AsProtoType for Duration
fn proto_type() -> ProtoType
Source§impl AsProtoType for FieldMask
impl AsProtoType for FieldMask
fn proto_type() -> ProtoType
Source§impl AsProtoType for Timestamp
impl AsProtoType for Timestamp
fn proto_type() -> ProtoType
Source§impl AsProtoType for FieldViolation
Available on crate feature rpc-types only.
impl AsProtoType for FieldViolation
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Link
Available on crate feature rpc-types only.
impl AsProtoType for Link
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Violation
Available on crate feature rpc-types only.
impl AsProtoType for Violation
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Violation
Available on crate feature rpc-types only.
impl AsProtoType for Violation
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for BadRequest
Available on crate feature rpc-types only.
impl AsProtoType for BadRequest
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for DebugInfo
Available on crate feature rpc-types only.
impl AsProtoType for DebugInfo
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for ErrorInfo
Available on crate feature rpc-types only.
impl AsProtoType for ErrorInfo
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for Help
Available on crate feature rpc-types only.
impl AsProtoType for Help
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for HttpHeader
Available on crate feature rpc-types only.
impl AsProtoType for HttpHeader
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for HttpRequest
Available on crate feature rpc-types only.
impl AsProtoType for HttpRequest
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for HttpResponse
Available on crate feature rpc-types only.
impl AsProtoType for HttpResponse
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for LocalizedMessage
Available on crate feature rpc-types only.
impl AsProtoType for LocalizedMessage
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for PreconditionFailure
Available on crate feature rpc-types only.
impl AsProtoType for PreconditionFailure
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for QuotaFailure
Available on crate feature rpc-types only.
impl AsProtoType for QuotaFailure
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for RequestInfo
Available on crate feature rpc-types only.
impl AsProtoType for RequestInfo
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for ResourceInfo
Available on crate feature rpc-types only.
impl AsProtoType for ResourceInfo
Available on crate feature
rpc-types only.fn proto_type() -> ProtoType
Source§impl AsProtoType for RetryInfo
Available on crate feature rpc-types only.
impl AsProtoType for RetryInfo
Available on crate feature
rpc-types only.