60template<
typename T, std::enable_if_t<irsol::traits::is_type_in_variant_v<T, InMessage>,
int> = 0>
87 explicit operator
bool()
const
130 std::string message_string;
142 std::stringstream ss;
143 ss <<
"ParserResult<" <<
message_type <<
">('" << message_string <<
"')";
Wrapper for the result of a protocol parsing attempt.
result_type getMessage() const
Returns the contained message.
error_type getError() const
Returns the contained error string.
ParserResult & operator=(ParserResult &&) noexcept=delete
std::variant< result_type, error_type > message_type
ParserResult(result_type &&message)
Constructs a successful parser result.
message_type _messageOrError
ParserResult(const ParserResult &)=delete
bool isError() const
Returns true if the result contains an error message.
bool isMessage() const
Returns true if the result contains a parsed message.
std::string toString() const
Returns a human-readable string representation of the result.
ParserResult(error_type &&error)
Constructs a failed parser result with an error string.
#define IRSOL_ASSERT_FATAL
Fatal-level assertion macro.
Common portability and diagnostic macros for the irsol library.
Template metaprogramming traits for type introspection in the irsol library.
Definitions and utilities for incoming and outgoing protocol messages.