StructSerializer.transmit

Dumps/serializes or loads/deserializes the content of s and its members.

transmit_data is called repeatedly; on each call, - if receive is false, it must it must store or forward the provided data; - if receive is true, it must populate the provided data buffer with data previously produced by dump(). Data which was populated once should not be populated again. So the delegate must behave like a stream receive function.

struct StructSerializer(bool AllowUnions = false)
static
size_t
transmit
(
bool receive
S
)
(
S* s
,
scope void delegate
(
void[] data
)
transmit_data
)

Parameters

s S*

struct instance (pointer)

transmit_data void delegate
(
void[] data
)

sending/receiving callback delegate

Return Value

Type: size_t

number of bytes read or written

Meta