@ StringFormat
A string was not in the form ['length', ':', 'string'].
BencodeParserError
Definition: bencode_parser.hpp:11
@ DictKey
A dictionary key was not a string.
Contains the structure for decoding and encoding bencode data.
Definition: bencode_parser.cpp:7
std::string error_to_string(const BencodeParserError error)
Function to translate a BencodeParserError into a string.
Definition: bencode_parser.cpp:8
Definition: bencode_parser.hpp:38
static std::string encode(BencodeValue const &value)
Encodes a BencodeValue object into a bencode string.
Definition: bencode_parser.cpp:31
@ IntValue
The integer was not a valid integer.
@ ListFormat
A list was not in the form ['l', 'bencode_value', ... , 'e'].
Used to handle errors without using exceptions.
Definition: result.hpp:18
@ IntFormat
A integer was not in the form ['i', 'number', 'e'].
@ DictFormat
A dictionary was not in the form ['d', 'bencode_value', ... , 'e'].
Definition: bencode_value.hpp:14
@ DictKeyOrder
The keys of the dictionary were not in lexicographical order.
util::Result< std::unique_ptr< BencodeValue >, BencodeParserError > BencodeResult
Result of a parsing operation.
Definition: bencode_parser.hpp:36