Stream.copyToAlloc

A helper function for copyTo, that uses a buffer created from an std.experimental.allocator Allocator. The buffer is of course disposed of afterwards.

  1. void copyToAlloc(Stream to, size_t bufferSize)
  2. void copyToAlloc(Stream to, size_t bufferSize, Alloc alloc)
    class Stream
    final
    void
    copyToAlloc
    (
    Alloc
    )
    (,
    size_t bufferSize
    ,
    auto ref Alloc alloc
    )
    if (
    !AllocHelper!Alloc.IsStatic
    )

Parameters

Alloc

The allocator to use.

to Stream

The stream to copy the data to.

bufferSize size_t

The size to give the buffer.

alloc Alloc

[Only for non-static allocator] the allocator instance to use.

Meta