Module bencode

Module bencode 

Source
Expand description

Borrowed bencode syntax tree with exact source spans.

Structs§

ByteString
A borrowed bencode byte string.
Integer
Borrowed, lossless bencode integer representation.
Span
Half-open byte offsets into the original bencoded input.
Value
A parsed bencode value borrowing byte strings from its input.

Enums§

OwnedValue
An owned bencode value that serializes canonically.
ValueKind
The payload of a borrowed bencode value.

Functions§

parse
Parses exactly one bencode value using default resource limits.
parse_with_limits
Parses exactly one bencode value using caller-provided resource limits.
validate_canonical
Validates that an input is syntactically valid and canonically encoded.