Output buffer to write to.
IRCClient to simulate the assignment of.
IRCServer to simulate the assignment of.
IRCClient client; IRCServer server; Appender!(char[]) sink; sink.formatClientAssignment(client, server);
import std.array : Appender; Appender!(char[]) sink; sink.reserve(128); IRCClient client; IRCServer server; with (client) { nickname = "NICKNAME"; user = "UUUUUSER"; server.address = "something.freenode.net"; server.port = 6667; server.daemon = IRCServer.Daemon.unreal; server.aModes = "eIbq"; } sink.formatClientAssignment(client, server); assert(sink.data == `IRCParser parser; with (parser) { client.nickname = "NICKNAME"; client.user = "UUUUUSER"; server.address = "something.freenode.net"; server.port = 6667; server.daemon = IRCServer.Daemon.unreal; server.aModes = "eIbq"; }`, '\n' ~ sink.data);
Constructs statement lines for each changed field of an IRCClient, including instantiating a fresh one.