Toast Engine
Loading...
Searching...
No Matches
event::ExposedEvent Concept Reference

Satisfied when ProtoTraits<T> is fully specialized with both conversion functions. More...

#include <event.hpp>

Concept definition

template<typename T>
concept ExposedEvent = requires(const T& e, const typename ProtoTraits<T>::Proto& p) {
{ ProtoTraits<T>::toProto(e) } -> std::same_as<typename ProtoTraits<T>::Proto>;
{ ProtoTraits<T>::fromProto(p) } -> std::same_as<typename ProtoTraits<T>::Event>;
}
Satisfied when ProtoTraits<T> is fully specialized with both conversion functions.
Definition event.hpp:197
Specialization point that exposes a C++ event type over the C# FFI via protobuf.
Definition event.hpp:188

Detailed Description

Satisfied when ProtoTraits<T> is fully specialized with both conversion functions.

Used as a constraint on registerProtoEvent<T>() and TOAST_PROTO_EVENT(). An event type that satisfies ExposedEvent can be sent from C# and received in C++, and vice versa.