1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
//! A zero dependency library to implement parsing the bencode format into a usable Bencode enum. //! //! Each Bencode object can be destructured into its value easily with the methods (`as_usize`, //! `as_bytes`, `as_map`, `as_list`, `as_string`). //! //! Due to the limitations of the rust typing system you are able to call any of these methods on //! any of the variants of the `Bencode` enum. //! //! If a destructuring method is called on the improper variant it will return an //! `InvalidVariantMethod` error, which will tell you which function was called, and the variant that //! was passed to it. //! //! //! //! test pub use bencode::*; pub use error::*; mod parser; mod error; mod bencode;