deepCopy

Simple wrapper on top of (de)serializer which allows to deep copy a given struct by storing all indirections in contiguous buffer. Most commonly used in tests - performance-critical applications should store Contiguous!(S) instead and copy it as it is much faster.

  1. S deepCopy(S src, void[] dst)
    S
    deepCopy
    (
    S
    )
    (
    ref S src
    ,
    ref void[] dst
    )
  2. S deepCopy(S src)

Parameters

dst void[]

resizable buffer used to serialize src

src S

struct to copy

Return Value

Type: S

new struct instance stored in dst cast to S

Meta