WPILibC++ 2024.1.1-beta-4
wpi::MutableStructSerializable Concept Reference

Specifies that a type is capable of in-place raw struct deserialization. More...

#include <wpi/struct/Struct.h>

Concept definition

template<typename T>
StructSerializable<T> && requires(T* out, std::span<const uint8_t> in) {
Struct<typename std::remove_cvref_t<T>>::UnpackInto(out, in);
}
Specifies that a type is capable of in-place raw struct deserialization.
Definition: Struct.h:93
Specifies that a type is capable of raw struct serialization and deserialization.
Definition: Struct.h:67
constexpr auto in(type t, int set) -> bool
Definition: core.h:611

Detailed Description

Specifies that a type is capable of in-place raw struct deserialization.

In addition to meeting StructSerializable, implementations must define a wpi::Struct<T> static member void UnpackInto(T*, std::span<const uint8_t>) to update the pointed-to T with the contents of the span.