Composer

The Composer is a configurable string joiner.

It was originally designed to be a way to allow assert messages with runtime parameters in functions marked @nogc.

Constructors

this
this(Char[] buffer, OverflowCallback callback)
Undocumented in source.
this
this(OverflowCallback callback)
Undocumented in source.
this
this(Char[] buffer)
Undocumented in source.

Members

Aliases

OverflowCallback
alias OverflowCallback = void function(ref Composer, size_t numCharsAttempted)
Undocumented in source.

Functions

clear
void clear()

Clears the composer of any previously written characters.

setBuffer
void setBuffer(Char[] buffer, size_t numCharsWritten)

Set the composer's buffer to buffer. This is to enable the creation of dynamic buffers.

write
Composer write(A args)

Composes a message from arguments. Anything that was previously written to the composer will be cleared.

Properties

bufferSize
size_t bufferSize [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
message
immutable(Char[]) message [@property getter]
messageLength
size_t messageLength [@property getter]

Meta