| Crates.io | proto-types |
| lib.rs | proto-types |
| version | 0.1.11 |
| created_at | 2025-08-13 17:38:32.733389+00 |
| updated_at | 2025-10-10 10:48:09.182076+00 |
| description | ⚙️ Implementations for various common protobuf types. |
| homepage | |
| repository | https://github.com/Rick-Phoenix/protocheck |
| max_upload_size | |
| id | 1793911 |
| size | 616,230 |
This crate provides implementations for several well known protobuf types, such as those from google.protobuf, google.rpc and google.type, plus some implementations for buf.validate which are used by protocheck.
You can use feature flags to selectively include the implementations that you're interested in.
Each struct/enum includes the default impls from prost such as Clone, Debug and so on.
The types coming from the google packages all have [serde::Serialize] and [serde::Deserialize] implementations when the serde feature flag is activated, and they also have From/TryFrom implementations for cel::Value when the cel feature is enabled.
Each type comes with implementations listed below, plus a variety of utility methods and helpers that can be found in the documentation.
All of the structs that have fallible methods also come with their own custom error enum.
Duration]
Interval] and to/from [chrono::TimeDelta]Timestamp]
chrono feature)std::time::SystemTime] and [chrono::DateTime]FieldMask]
Empty]Any]All of these can be included with the all_common flag, or selected individually with their respective flag.
TimeOfDay]
chrono::NaiveTime]Date]
chrono::NaiveDate]DateTime]
chrono::NaiveDateTime], [chrono::DateTime] with [chrono::FixedOffset] or [chrono::Utc] (and [chrono::DateTime] with [chrono_tz::Tz] with the chrono-tz feature)TimeZone]
Interval]
Duration]Money]
Color]
palette::Srgba] (with the palette feature)Fraction]
Decimal]
rust_decimal::Decimal]LatLng]
PostalAddress]
PhoneNumber]
kind field from being None)kind field)Quaternion]LocalizedText]Expr]CalendarPeriod]Month]DayOfWeek]Status] (available by default, even without the flag)These can be enabled with the rpc flag.
ErrorInfo]DebugInfo]RetryInfo]QuotaFailure]quota_failure::Violation]PreconditionFailure]precondition_failure::Violation]BadRequest]bad_request::FieldViolation]RequestInfo]ResourceInfo]Help]help::Link]LocalizedMessage]HttpRequest]HttpResponse]HttpHeader]Code]