Type Function Formatter [src]
Alias for std.json.fmt.Formatter
Formats the given value using stringify.
Prototype
pub fn Formatter(comptime T: type) type
Parameters
T: type
Source
pub fn Formatter(comptime T: type) type {
return struct {
value: T,
options: StringifyOptions,
pub fn format(
self: @This(),
comptime fmt_spec: []const u8,
options: std.fmt.FormatOptions,
writer: anytype,
) !void {
_ = fmt_spec;
_ = options;
try stringify(self.value, self.options, writer);
}
};
}