Skip to documentation
SLOP

tiny.sql.HistorySyncFetchRequest

Reference tiny.sql HistorySyncFetchRequest

Defined in sync.

API (5)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callssyncFetchRequest
Static calls · unresolved targets: unknown · external targets: unknown.

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;
Called byCallsNo direct callssyncfetchRequestFromHistoryHistorySyncFetchRequestinit
Static calls · unresolved targets: 0 · external targets: 3.

Audit

Definitions3
Public names6
Members3
Version26.7.0
Revisiondaab053ee433