• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //! Library to read and write protocol buffers data.
2 
3 #![deny(missing_docs)]
4 #![deny(broken_intra_doc_links)]
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;
13 pub use crate::cached_size::CachedSize;
14 #[cfg(feature = "bytes")]
15 pub use crate::chars::Chars;
16 pub use crate::clear::Clear;
17 pub use crate::coded_input_stream::CodedInputStream;
18 pub use crate::coded_output_stream::CodedOutputStream;
19 pub use crate::enums::ProtobufEnum;
20 pub use crate::error::ProtobufError;
21 pub use crate::error::ProtobufResult;
22 #[allow(deprecated)]
23 pub use crate::message::parse_from_bytes;
24 #[cfg(feature = "bytes")]
25 #[allow(deprecated)]
26 pub use crate::message::parse_from_carllerche_bytes;
27 #[allow(deprecated)]
28 pub use crate::message::parse_from_reader;
29 #[allow(deprecated)]
30 pub use crate::message::parse_length_delimited_from;
31 #[allow(deprecated)]
32 pub use crate::message::parse_length_delimited_from_bytes;
33 #[allow(deprecated)]
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;
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;
45 
46 // generated
47 pub mod descriptor;
48 pub mod plugin;
49 pub mod rustproto;
50 
51 pub mod wire_format;
52 
53 mod clear;
54 mod coded_input_stream;
55 mod coded_output_stream;
56 pub mod compiler_plugin;
57 mod enums;
58 pub mod error;
59 pub mod ext;
60 pub mod json;
61 pub mod lazy;
62 mod lazy_v2;
63 mod message;
64 pub mod reflect;
65 mod repeated;
66 pub mod rt;
67 mod singular;
68 pub mod text_format;
69 pub mod types;
70 pub mod well_known_types;
71 mod well_known_types_util;
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;
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 
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 = "";
101 include!(concat!(env!("OUT_DIR"), "/version.rs"));
102