VersionDecorator.loadCopy

Loads versioned struct from buffer and stores resulting data in copy_buffer, leaving buffer untouched.

If deserialized struct is of different version than requested one, converts it iteratively, one version increment/decrement at time.

class VersionDecorator
loadCopy
(
S
)
(
in void[] buffer
,)

Parameters

buffer void[]

data previously generated by store method, contains both version data and serialized struct. Effectively const

copy_buffer Contiguous!(S)

buffer where deserialized struct data will be stored. Will be extended if needed and won't contain version bytes

Return Value

Type: Contiguous!(S)

slice of buffer after deserialization and version stripping

Meta