| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 1 | //! Library to read and write protocol buffers data. |
| 2 | |
| 3 | #![deny(missing_docs)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 4 | #![deny(broken_intra_doc_links)] |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 5 | |
| 6 | #[cfg(feature = "bytes")] |
| 7 | extern crate bytes; |
| 8 | #[cfg(feature = "with-serde")] |
| 9 | extern crate serde; |
| 10 | #[macro_use] |
| 11 | #[cfg(feature = "with-serde")] |
| 12 | extern crate serde_derive; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 13 | pub use crate::cached_size::CachedSize; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 14 | #[cfg(feature = "bytes")] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 15 | pub use crate::chars::Chars; |
| 16 | pub use crate::clear::Clear; |
| Joel Galenson | fa77f00 | 2021-04-02 11:32:01 -0700 | [diff] [blame] | 17 | pub use crate::coded_input_stream::CodedInputStream; |
| 18 | pub use crate::coded_output_stream::CodedOutputStream; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 19 | pub use crate::enums::ProtobufEnum; |
| 20 | pub use crate::error::ProtobufError; |
| 21 | pub use crate::error::ProtobufResult; |
| Haibo Huang | 914311b | 2021-01-07 18:06:15 -0800 | [diff] [blame] | 22 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 23 | pub use crate::message::parse_from_bytes; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 24 | #[cfg(feature = "bytes")] |
| Haibo Huang | 914311b | 2021-01-07 18:06:15 -0800 | [diff] [blame] | 25 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 26 | pub use crate::message::parse_from_carllerche_bytes; |
| Haibo Huang | 914311b | 2021-01-07 18:06:15 -0800 | [diff] [blame] | 27 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 28 | pub use crate::message::parse_from_reader; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 29 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 30 | pub use crate::message::parse_length_delimited_from; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 31 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 32 | pub use crate::message::parse_length_delimited_from_bytes; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 33 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 34 | pub use crate::message::parse_length_delimited_from_reader; |
| 35 | pub use crate::message::Message; |
| 36 | pub use crate::repeated::RepeatedField; |
| 37 | pub use crate::singular::SingularField; |
| 38 | pub use crate::singular::SingularPtrField; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 39 | pub use crate::unknown::UnknownFields; |
| 40 | pub use crate::unknown::UnknownFieldsIter; |
| 41 | pub use crate::unknown::UnknownValue; |
| 42 | pub use crate::unknown::UnknownValueRef; |
| 43 | pub use crate::unknown::UnknownValues; |
| 44 | pub use crate::unknown::UnknownValuesIter; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 45 | |
| 46 | // generated |
| 47 | pub mod descriptor; |
| 48 | pub mod plugin; |
| 49 | pub mod rustproto; |
| 50 | |
| Joel Galenson | fa77f00 | 2021-04-02 11:32:01 -0700 | [diff] [blame] | 51 | pub mod wire_format; |
| 52 | |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 53 | mod clear; |
| Joel Galenson | fa77f00 | 2021-04-02 11:32:01 -0700 | [diff] [blame] | 54 | mod coded_input_stream; |
| 55 | mod coded_output_stream; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 56 | pub mod compiler_plugin; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 57 | mod enums; |
| 58 | pub mod error; |
| 59 | pub mod ext; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 60 | pub mod json; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 61 | pub mod lazy; |
| Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 62 | mod lazy_v2; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 63 | mod message; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 64 | pub mod reflect; |
| 65 | mod repeated; |
| 66 | pub mod rt; |
| 67 | mod singular; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 68 | pub mod text_format; |
| 69 | pub mod types; |
| 70 | pub mod well_known_types; |
| Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 71 | mod well_known_types_util; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 72 | |
| 73 | // used by test |
| 74 | #[cfg(test)] |
| 75 | #[path = "../../protobuf-test-common/src/hex.rs"] |
| 76 | mod hex; |
| 77 | |
| 78 | // used by rust-grpc |
| 79 | pub mod descriptorx; |
| 80 | |
| 81 | mod cached_size; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 82 | mod chars; |
| 83 | #[doc(hidden)] // used by codegen |
| 84 | pub mod rust; |
| 85 | mod strx; |
| 86 | mod unknown; |
| 87 | mod varint; |
| 88 | mod zigzag; |
| 89 | |
| 90 | mod misc; |
| 91 | |
| 92 | mod buf_read_iter; |
| 93 | |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 94 | /// This symbol is in generated `version.rs`, include here for IDE |
| 95 | #[cfg(never)] |
| 96 | pub const VERSION: &str = ""; |
| 97 | /// This symbol is in generated `version.rs`, include here for IDE |
| 98 | #[cfg(never)] |
| 99 | #[doc(hidden)] |
| 100 | pub const VERSION_IDENT: &str = ""; |
| Chih-Hung Hsieh | 1b6b647 | 2020-10-25 04:16:21 -0700 | [diff] [blame] | 101 | include!(concat!(env!("OUT_DIR"), "/version.rs")); |