Append to the end of a buffer chain, growing the chain (by allocating new buffers) in increments of at least growth bytes every time. Won't grow (and push() and ensure() will throw) if growth == 0.
Synopsis
Declared in <folly/io/Cursor.h>
class Appender
: public Writable<Appender>
Description
TODO(tudorb): add a flavor of Appender that reallocates one IOBuf instead of chaining.
Base Classes
Name |
Description |
Mixin providing write operations for cursor types. |
Member Functions
Name |
Description |
|
Construct an Appender that appends to the end of an IOBuf chain. |
Mark n bytes (must be <= length()) as appended, as per the IOBuf::append() method. |
|
Ensure at least n contiguous bytes available to write. Postcondition: length() >= n. |
|
Get the amount of writable tailroom of the IOBuf this cursor points to. |
|
Append a StringPiece to the buffer. |
|
Append to the end of this buffer, using a printf() style format specifier. |
|
|
|
|
|
Append to the end of this buffer using a printf() style format and va_list. |
|
Get the writable tail of the IOBuf this cursor points to. |
|
|
|
|
|
|
Using Declarations
Name |
Description |
Inherit the base ByteRange and Cursor overloads of pushAtMost. |
Created with MrDocs