VersionDecorator.handleVersion

Utility method to convert struct contained in input buffer to needed struct version. Converted struct will be stored in the same buffer replacing old data.

You can override this method to change version converting logic.

  1. Contiguous!(S) handleVersion(Buffer!(void) buffer, Version.Type input_version)
    class VersionDecorator
    protected
    handleVersion
    (
    S
    )
  2. Contiguous!(S) handleVersion(void[] buffer, Version.Type input_version)

Parameters

S

final struct version to get

buffer Buffer!(void)

input buffer after version bytes have been stripped off, will contain resulting struct data after this method exits

input_version Version.Type

version that was extracted from buffer

Return Value

Type: Contiguous!(S)

deserialize() result for the last struct conversion

Throws

VersionHandlingException if can't convert between provided versions

Meta