Skip to documentation
SLOP

tiny.sandbox.Snapshot

Reference tiny.sandbox Snapshot

Defined in scan.

API (7)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: lib/sandbox/src/scan.zig:8

zig
pub const Snapshot = struct {    allocator: Allocator,    entries: std.ArrayList(change.Entry) = .empty,    pub fn init(allocator: Allocator) Snapshot {        return .{ .allocator = allocator };    }    pub fn deinit(self: *Snapshot) void {        for (self.entries.items) |*entry| entry.deinit(self.allocator);        self.entries.deinit(self.allocator);        self.* = undefined;    }    pub fn append(self: *Snapshot, entry: change.Entry) Allocator.Error!void {        try self.entries.append(self.allocator, try entry.clone(self.allocator));    }    pub fn find(self: *const Snapshot, path: []const u8) ?change.Entry {        for (self.entries.items) |entry| {            if (std.mem.eql(u8, entry.path, path)) return entry;        }        return null;    }    pub fn sort(self: *Snapshot) void {        std.mem.sort(change.Entry, self.entries.items, {}, lessThan);    }};

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

zig
pub const Snapshot = scan.Snapshot;
Called byCallsNo direct callsscancapturescancapturePathstest sourcelib.sandbox.src.scantest: scan diff records puts deletes ...Snapshotappend
Static calls · unresolved targets: 1 · external targets: 1.
Called byCallsNo direct callsscancapturescancapturePathstest sourcelib.sandbox.src.scantest: scan diff records puts deletes ...Snapshotdeinit
Static calls · unresolved targets: 0 · external targets: 2.
Called byCallsNo direct callsscancapturescancapturePathstest sourcelib.sandbox.src.scantest: scan diff records puts deletes ...Snapshotinit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsscancapturescancapturePathstest sourcelib.sandbox.src.scantest: scan diff records puts deletes ...Snapshotsort
Static calls · unresolved targets: 0 · external targets: 0.

Audit

Definitions6
Public names12
Members2
Version26.7.0
Revisiondaab053ee433