fn bufValue(value: anytype, comptime min_len: usize) BufType(@TypeOf(value), min_len)
fn bufValue(value: anytype, comptime min_len: usize) BufType(@TypeOf(value), min_len) { return switch (@typeInfo(@TypeOf(value))) { .comptime_int, .int => @intCast(value), .@"enum" => @backingInt(value), .bool => @intFromBool(value), .@"struct" => @intCast(@as(@Int(.unsigned, @bitSizeOf(@TypeOf(value))), @bitCast(value))), else => unreachable, }; }