vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Function AllocAppender.append

Appends a number of bytes in-place.

void append (
  scope @safe size_t delegate(scope AllocAppender.ElemType[] dst) del
);

void append (
  scope size_t delegate(scope AllocAppender.ElemType[] dst) del
);

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).

Authors

Sönke Ludwig

Copyright

© 2012 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.