Expand description
A zero dependency Bencode parsing library.
To get started try passing a bencoded byte array to Benc::parse()
.
Modules§
- convert
- The implementations for the WrapBenc, and UnwrapBenc traits, which allow converting the Benc enum to and from its constituent types (BInt, BStr, BVec, BMap). Used when destructuring the Benc tree into a struct or when parsing values.
- encode
- The implementations for the EncodeBencode trait. Which allow a Benc enum to be encoded back into an array of ascii bytes.
- parse
- The implementations for the ParseBenc trait, that allows a sequence of bytes to be read into a Bencode type: (BInt, BStr, BVec, BMap).
- util
- A Collection of internal helper functions for the library.
Structs§
- BMap
Impl - Implementation: A HashMap wrapper that clones the contained Benc items when self.get() is called to avoid causing a move on the un-Copy-able type Benc.
Enums§
- Benc
- The nested Bencode structure container.