WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::util::MutableStructSerializable Concept Reference

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

#include <wpi/util/struct/Struct.hpp>

Concept definition

template<typename T, typename... I>
StructSerializable<T, I...> &&
requires(T* out, std::span<const uint8_t> in, const I&... info) {
typename std::remove_cvref_t<I>...>::UnpackInto(out, in, info...);
}
Specifies that a type is capable of in-place raw struct deserialization.
Definition Struct.hpp:103
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.hpp:69
Struct serialization template.
Definition Struct.hpp:39

Detailed Description

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

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