fn writeStreamMaxDepth(out_stream: anytype, options: StringifyOptions, comptime max_depth: ?usize) WriteStream(@TypeOf(out_stream), if (max_depth) |d| .{ .checked_to_fixed_depth = d } else .assumed_correct)
[src]
See WriteStream
for documentation. The returned object includes 1 bit of size per max_depth
to enable safety checks on the order of method calls; see the grammar in the WriteStream
documentation. max_depth
is rounded up to the nearest multiple of 8. If the nesting depth exceeds max_depth
, it is detectable illegal behavior. Give null
for max_depth
to disable safety checks for the grammar and allow arbitrary nesting depth. In ReleaseFast
and ReleaseSmall
, max_depth
is ignored, effectively equivalent to passing null
. Alternatively, see writeStreamArbitraryDepth
to do safety checks to arbitrary depth.
The caller does not need to call deinit()
on the returned object.