Files
bun.sh/src/sql/postgres/protocol/WriteWrap.zig
pfg 83760fc446 Sort imports in all files (#21119)
Co-authored-by: taylor.fish <contact@taylor.fish>
2025-07-21 13:26:47 -07:00

13 lines
461 B
Zig

pub fn WriteWrap(comptime Container: type, comptime writeFn: anytype) type {
return struct {
pub fn write(this: *Container, context: anytype) AnyPostgresError!void {
const Context = @TypeOf(context);
try writeFn(this, Context, NewWriter(Context){ .wrapped = context });
}
};
}
const AnyPostgresError = @import("../AnyPostgresError.zig").AnyPostgresError;
const NewWriter = @import("./NewWriter.zig").NewWriter;