fn Formatter(comptime format_fn: anytype) type

Creates a Formatter type from a format function. Wrapping data in Formatter(func) causes the data to be formatted using the given function func. func must be of the following form:

 fn formatExample(
     data: T,
     comptime fmt: []const u8,
     options: std.fmt.FormatOptions,
     writer: anytype,
 ) !void;

Parameters

format_fn: anytype,

Fields

data: optional_payload_safe,

Functions

fn format(self: anytype, comptime fmt: []const u8, options: std.fmt.FormatOptions, writer: anytype) @TypeOf(writer).Error!void

No documentation provided.