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