mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
28 lines
735 B
Zig
28 lines
735 B
Zig
name: Data = .{ .empty = {} },
|
|
value: Data = .{ .empty = {} },
|
|
|
|
pub fn deinit(this: *@This()) void {
|
|
this.name.deinit();
|
|
this.value.deinit();
|
|
}
|
|
|
|
pub fn decodeInternal(this: *@This(), comptime Container: type, reader: NewReader(Container)) !void {
|
|
const length = try reader.length();
|
|
bun.assert(length >= 4);
|
|
|
|
this.* = .{
|
|
.name = try reader.readZ(),
|
|
.value = try reader.readZ(),
|
|
};
|
|
}
|
|
|
|
pub const decode = DecoderWrap(ParameterStatus, decodeInternal).decode;
|
|
|
|
// @sortImports
|
|
|
|
const ParameterStatus = @This();
|
|
const bun = @import("bun");
|
|
const Data = @import("../Data.zig").Data;
|
|
const DecoderWrap = @import("./DecoderWrap.zig").DecoderWrap;
|
|
const NewReader = @import("./NewReader.zig").NewReader;
|