tiny.sql.HistorySyncFetchRequest
Defined in sync.
API (5)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/sql/src/sync.zig:284
zig
pub const FetchRequest = struct { allocator: Allocator, wants: [][]u8, haves: []version.Hash, pub fn init(allocator: Allocator, wants: []const []const u8, haves: []const version.Hash) Allocator.Error!FetchRequest { const owned_wants = try allocator.alloc([]u8, wants.len); var want_count: usize = 0; errdefer { for (owned_wants[0..want_count]) |want| allocator.free(want); if (owned_wants.len != 0) allocator.free(owned_wants); } for (wants, owned_wants) |want, *target| { target.* = try allocator.dupe(u8, want); want_count += 1; } const owned_haves = try allocator.dupe(version.Hash, haves); errdefer if (owned_haves.len != 0) allocator.free(owned_haves); return .{ .allocator = allocator, .wants = owned_wants, .haves = owned_haves, }; } pub fn deinit(self: *FetchRequest) void { for (self.wants) |want| self.allocator.free(want); if (self.wants.len != 0) self.allocator.free(self.wants); if (self.haves.len != 0) self.allocator.free(self.haves); self.* = undefined; }};Source: lib/sql/src/root.zig:115
zig
pub const HistorySyncFetchRequest = sync.FetchRequest;Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 3 |
| Version | 26.7.0 |
| Revision | daab053ee433 |