AllocAppender.append

Appends a number of bytes in-place.

The delegate will get the memory slice of the memory that follows the already written data. Use reserve to ensure that this slice has enough room. The delegate should overwrite as much of the slice as desired and then has to return the number of elements that should be appended (counting from the start of the slice).

  1. void append(size_t delegate(scope ElemType[] dst) @(safe) del)
  2. void append(size_t delegate(scope ElemType[] dst) del)
    struct AllocAppender(ArrayType : E[], E)
    static if(!is(E == immutable) || !hasAliasing!E)
    void
    append
    (
    scope size_t delegate
    (
    scope ElemType[] dst
    )
    del
    )

Meta