Crunch
A Message Definition Language for Getting Things Right
Loading...
Searching...
No Matches
Crunch::detail::Decoder< Serdes, Integrity, Messages > Class Template Reference

Decoder class for deserializing one of N possible message types from a buffer. More...

#include <crunch_detail.hpp>

Public Types

using VariantType = std::variant< Messages... >
 

Public Member Functions

constexpr std::optional< ErrorDecode (std::span< const std::byte > buffer, VariantType &out_message)
 

Detailed Description

template<typename Serdes, typename Integrity, messages::CrunchMessage... Messages>
requires UniqueMessageIds<Messages...>
class Crunch::detail::Decoder< Serdes, Integrity, Messages >

Decoder class for deserializing one of N possible message types from a buffer.

Template Parameters
SerdesThe serdes policy to use.
IntegrityThe integrity policy to use.
MessagesThe message types which may be deserialized (must have unique message IDs).

The documentation for this class was generated from the following file: