encodeCborAggregate

Encodes classes and structs. If withFieldName is yes, than value is encoded as map. If withFieldName is no, then value is encoded as an array. If flatten flag is yes then static arrays and structs will be encoded in place without headers.

size_t
encodeCborAggregate
(
Flag!"WithFieldName" withFieldName
Flag!"Flatten" flatten = Flag!"Flatten".no
R
A
)
(
auto ref R sink
,
auto ref A aggregate
)
if (
isOutputRange!(R, ubyte) &&
(
is(A == struct) ||
is(A == class)
)
)

Meta