WPILibC++ 2024.3.2
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, typename... I>
StructSerializable<T, I...> &&
requires(T* out, std::span<const uint8_t> in, const I&... info) {
Struct<typename std::remove_cvref_t<T>,
typename std::remove_cvref_t<I>...>::UnpackInto(out, in, info...);
}
Specifies that a type is capable of in-place raw struct deserialization.
Definition: Struct.h:102
Specifies that a type is capable of raw struct serialization and deserialization.
Definition: Struct.h:68
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.