pub fn beginWriteRaw(self: *Stringify) !void self: *Stringify258
259
260
261
262
263
264pub fn beginWriteRaw(self: *Stringify) !void {
if (build_mode_has_safety) {
assert(self.raw_streaming_mode == .none);
self.raw_streaming_mode = .value;
}
try self.valueStart();
}
An alternative to calling
writethat allows you to write directly to the.writerfield, e.g. with.writer.writeAll(). CallbeginWriteRaw(), then write a complete value (including any quotes if necessary) directly to the.writerfield, then callendWriteRaw(). This can be useful for streaming very long strings into the output without needing it all buffered in memory.