tiny.choir.backends.artifact.model.verification
Defined in backends.artifact.model.
API (6)
Actions
Public operations.
Types and contracts
Public types and contracts.
Source
Source: lib/choir/src/backends/artifact/model/root.zig:7
zig
pub const verification = @import("verification.zig");Source: lib/choir/src/backends/artifact/model/verification.zig
zig
const std = @import("std");const Allocator = std.mem.Allocator;const artifact = @import("root.zig");const slice = artifact.slice;pub const VerificationState = enum(u8) { not_run = 1, passed = 2, failed = 3, skipped = 4,};pub const VerificationStatus = struct { state: VerificationState = .not_run, stage: ?[]const u8 = null, message: ?[]const u8 = null, pub fn dupe(self: VerificationStatus, allocator: Allocator) Allocator.Error!VerificationStatus { var out = VerificationStatus{ .state = self.state }; errdefer out.deinit(allocator); out.stage = try slice.dupeOptional(allocator, self.stage); out.message = try slice.dupeOptional(allocator, self.message); return out; } pub fn deinit(self: *VerificationStatus, allocator: Allocator) void { slice.freeOptional(allocator, self.stage); slice.freeOptional(allocator, self.message); self.* = .{}; } pub fn eql(self: VerificationStatus, other: VerificationStatus) bool { return self.state == other.state and slice.optionalEqual(self.stage, other.stage) and slice.optionalEqual(self.message, other.message); } pub fn replace(self: *VerificationStatus, allocator: Allocator, status: VerificationStatus) Allocator.Error!void { const owned = try status.dupe(allocator); self.deinit(allocator); self.* = owned; }};Audit
| Definitions | 7 |
|---|---|
| Public names | 19 |
| Members | 7 |
| Version | 26.7.0 |
| Revision | daab053ee433 |