DoxigAlpha

Alt

Creates a type suitable for instantiating and passing to a "{f}" placeholder.

Fields of this type

Fields

#
data:Data

Functions in this namespace

Functions

#

Source

Implementation

#
pub fn Alt(
    comptime Data: type,
    comptime formatFn: fn (data: Data, writer: *Writer) Writer.Error!void,
) type {
    return struct {
        data: Data,
        pub inline fn format(self: @This(), writer: *Writer) Writer.Error!void {
            try formatFn(self.data, writer);
        }
    };
}