Serializer.serialize

In-place serialization that takes advantage of the fact Contiguous instances already have required data layout. All arrays within src will be reset to null (and their length to 0) making their data unreachable from original struct. This is done to minimize risk of dangling array pointers.

  1. void[] serialize(S src, Buffer!(void) dst)
  2. void[] serialize(S src, D[] dst)
  3. void[] serialize(Contiguous!(S) src)
    struct Serializer
    static
    void[]
    serialize
    (
    S
    )
    (
    ref Contiguous!(S) src
    )

Parameters

src Contiguous!(S)

contiguous struct instance to serialize

Return Value

Type: void[]

slice of internal src byte array after setting all array pointers to null

Meta