Debian Codegraph @

src/lib.rs

raw symbols SCIP
1 //! Encodes and decodes bencoded structures.
2 //!
3 //! The decoder is explicitly designed to be zero-copy as much as possible, and to not
4 //! accept any sort of invalid encoding in any mode (including non-canonical encodings)
5 //!
6 //! The encoder is likewise designed to ensure that it only produces valid structures.
7
8 #![cfg_attr(not(feature = "std"), no_std)]
9
10 extern crate alloc;
11
12 #[cfg(all(test, feature = "serde"))]
13 #[macro_use]
14 mod assert_matches;
15
16 pub mod decoding;
17 pub mod encoding;
18 pub mod state_tracker;
19
20 #[cfg(any(test, feature = "inspect"))]
21 pub mod inspect;
22
23 #[cfg(feature = "serde")]
24 pub mod serde;
25
26 pub mod value;
27
28 #[rustversion::since(1.40)]
29 const _: () = {
30 #[cfg(doctest)]
31 doc_comment::doctest!("../../README.md");
32 };