Skip to main content

proto_types/
lib.rs

1#![no_std]
2#![deny(clippy::alloc_instead_of_core)]
3#![deny(clippy::std_instead_of_alloc)]
4#![deny(clippy::std_instead_of_core)]
5#![cfg_attr(docsrs, feature(doc_cfg))]
6#![doc = include_str!("../README.md")]
7
8//! # Feature flags
9#![cfg_attr(
10		feature = "document-features",
11		doc = ::document_features::document_features!()
12)]
13
14#[cfg(any(test, feature = "std"))]
15extern crate std;
16
17extern crate alloc;
18
19/// Generated rust code from buf.validate protobuf package, with some added methods and structs.
20#[cfg(feature = "protovalidate")]
21pub mod protovalidate;
22
23/// Implementations to allow conversion from well known types to [`cel::Value`](::cel::Value)
24#[cfg(feature = "cel")]
25pub mod cel;
26
27pub mod rpc;
28pub use rpc::*;
29
30/// Struct wrappers for protobuf-specific numeric types such as `sint32` or `fixed64`.
31pub mod num_wrappers;
32
33pub mod common;
34pub use common::*;
35pub use protobuf::*;
36mod protobuf;
37mod protobuf_impls;
38
39/// Implementations and units for Duration structs.
40pub mod duration;
41
42pub mod timestamp;
43
44mod any;
45mod any_impls;
46#[cfg(any(
47	feature = "diesel-postgres",
48	feature = "diesel-sqlite",
49	feature = "diesel-mysql"
50))]
51mod diesel_impls;
52
53mod field_mask;
54
55mod field_type;
56#[doc(inline)]
57pub use field_type::FieldType;
58
59mod empty;
60pub use empty::Empty;
61
62mod constants;
63mod conversions;
64mod datetime_internal;
65mod type_url;
66
67use alloc::{format, string::String, string::ToString, vec::Vec};
68use core::str::FromStr;
69use core::{convert::TryFrom, fmt, time};
70use core::{
71	fmt::{Debug, Display},
72	hash::Hash,
73};
74
75use prost::{DecodeError, EncodeError, Message, Name};
76pub(crate) use type_url::{TypeUrl, type_url_for};