| 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 | // Because we need compat with Rust 1.26 |
| 6 | #![allow(bare_trait_objects)] |
| 7 | |
| 8 | #[cfg(feature = "bytes")] |
| 9 | extern crate bytes; |
| 10 | #[cfg(feature = "with-serde")] |
| 11 | extern crate serde; |
| 12 | #[macro_use] |
| 13 | #[cfg(feature = "with-serde")] |
| 14 | extern crate serde_derive; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 15 | pub use crate::cached_size::CachedSize; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 16 | #[cfg(feature = "bytes")] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 17 | pub use crate::chars::Chars; |
| 18 | pub use crate::clear::Clear; |
| 19 | pub use crate::enums::ProtobufEnum; |
| 20 | pub use crate::error::ProtobufError; |
| 21 | pub use crate::error::ProtobufResult; |
| 22 | pub use crate::message::parse_from_bytes; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 23 | #[cfg(feature = "bytes")] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 24 | pub use crate::message::parse_from_carllerche_bytes; |
| 25 | pub use crate::message::parse_from_reader; |
| 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; |
| 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_bytes; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 30 | #[allow(deprecated)] |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 31 | pub use crate::message::parse_length_delimited_from_reader; |
| 32 | pub use crate::message::Message; |
| 33 | pub use crate::repeated::RepeatedField; |
| 34 | pub use crate::singular::SingularField; |
| 35 | pub use crate::singular::SingularPtrField; |
| 36 | pub use crate::stream::wire_format; |
| 37 | pub use crate::stream::CodedInputStream; |
| 38 | pub use crate::stream::CodedOutputStream; |
| 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 | |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 51 | mod clear; |
| 52 | pub mod compiler_plugin; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 53 | mod enums; |
| 54 | pub mod error; |
| 55 | pub mod ext; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 56 | pub mod json; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 57 | pub mod lazy; |
| Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 58 | mod lazy_v2; |
| Haibo Huang | d32e6ee | 2020-08-12 13:52:04 -0700 | [diff] [blame] | 59 | mod message; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 60 | pub mod reflect; |
| 61 | mod repeated; |
| 62 | pub mod rt; |
| 63 | mod singular; |
| 64 | pub mod stream; |
| 65 | pub mod text_format; |
| 66 | pub mod types; |
| 67 | pub mod well_known_types; |
| Haibo Huang | 52aa785 | 2020-07-10 20:23:55 -0700 | [diff] [blame] | 68 | mod well_known_types_util; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 69 | |
| 70 | // used by test |
| 71 | #[cfg(test)] |
| 72 | #[path = "../../protobuf-test-common/src/hex.rs"] |
| 73 | mod hex; |
| 74 | |
| 75 | // used by rust-grpc |
| 76 | pub mod descriptorx; |
| 77 | |
| 78 | mod cached_size; |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 79 | mod chars; |
| 80 | #[doc(hidden)] // used by codegen |
| 81 | pub mod rust; |
| 82 | mod strx; |
| 83 | mod unknown; |
| 84 | mod varint; |
| 85 | mod zigzag; |
| 86 | |
| 87 | mod misc; |
| 88 | |
| 89 | mod buf_read_iter; |
| 90 | |
| Chih-Hung Hsieh | cfc3a23 | 2020-06-10 20:13:05 -0700 | [diff] [blame] | 91 | /// This symbol is in generated `version.rs`, include here for IDE |
| 92 | #[cfg(never)] |
| 93 | pub const VERSION: &str = ""; |
| 94 | /// This symbol is in generated `version.rs`, include here for IDE |
| 95 | #[cfg(never)] |
| 96 | #[doc(hidden)] |
| 97 | pub const VERSION_IDENT: &str = ""; |
| Chih-Hung Hsieh | 1b6b647 | 2020-10-25 04:16:21 -0700 | [diff] [blame^] | 98 | include!(concat!(env!("OUT_DIR"), "/version.rs")); |