sveppa_bencode/
lib.rs

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