Skip to documentation
SLOP

tiny.sandbox.ChangeSet

Reference tiny.sandbox ChangeSet

Defined in change.

API (8)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: lib/sandbox/src/change.zig:64

zig
pub const Set = struct {    allocator: Allocator,    items: std.ArrayList(Change) = .empty,    pub fn init(allocator: Allocator) Set {        return .{ .allocator = allocator };    }    pub fn deinit(self: *Set) void {        for (self.items.items) |*item| item.deinit(self.allocator);        self.items.deinit(self.allocator);        self.* = undefined;    }    pub fn append(self: *Set, operation: Operation, entry: Entry) Allocator.Error!void {        try self.items.append(self.allocator, .{            .operation = operation,            .entry = try entry.clone(self.allocator),        });    }    pub fn len(self: *const Set) usize {        return self.items.items.len;    }    pub fn get(self: *const Set, index: usize) ?Change {        if (index >= self.items.items.len) return null;        return self.items.items[index];    }    pub fn find(self: *const Set, path: []const u8) ?Change {        for (self.items.items) |item| {            if (std.mem.eql(u8, item.entry.path, path)) return item;        }        return null;    }};

Source: lib/sandbox/src/root.zig:49

zig
pub const ChangeSet = change.Set;
Called byCallsNo direct callsprivate sourcelib.sandbox.src.bwrapdiffUppertest sourcelib.sandbox.src.changetest: change set owns cloned entriesscandiffChangeSetappend
Static calls · unresolved targets: 1 · external targets: 1.
Called byCallsNo direct callsprivate sourcelib.sandbox.src.bwrapdiffUppertest sourcelib.sandbox.src.changetest: change set owns cloned entriesResultdeinitscandiffChangeSetdeinit
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsNo direct callstest sourcelib.sandbox.src.changetest: change set owns cloned entriesChangeSetfind
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsprivate sourcelib.sandbox.src.bwrapdiffUppertest sourcelib.sandbox.src.changetest: change set owns cloned entriesscandiffChangeSetinit
Static calls · unresolved targets: 0 · external targets: 0.

Audit

Definitions7
Public names14
Members2
Version26.7.0
Revisiondaab053ee433