tiny.trace.EventKind
Defined in event.
API (13)
Actions
Public operations.
Fields and members
Public fields and members.
allocationboundarycheckpointcheckpoint_restorefreefunction_enterfunction_exitsafepointsession_endsession_startuser
Source
Source: lib/trace/src/event.zig:43
zig
pub const EventKind = enum { session_start, session_end, function_enter, function_exit, safepoint, boundary, allocation, free, checkpoint, checkpoint_restore, user, pub fn tag(self: EventKind) []const u8 { return switch (self) { .session_start => "session.start", .session_end => "session.end", .function_enter => "function.enter", .function_exit => "function.exit", .safepoint => "safepoint", .boundary => "boundary", .allocation => "allocation", .free => "free", .checkpoint => "checkpoint", .checkpoint_restore => "checkpoint.restore", .user => "user", }; } pub fn fromTag(text: []const u8) ?EventKind { inline for ( @typeInfo(EventKind).@"enum".field_names, @typeInfo(EventKind).@"enum".field_values, ) |field_name, field_name_value| { const field = .{ .name = field_name, .value = field_name_value }; const kind: EventKind = @fromBackingInt(@intCast(field.value)); if (std.mem.eql(u8, text, kind.tag())) return kind; } return null; }};Source: lib/trace/src/root.zig:42
zig
pub const EventKind = event.EventKind;Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 11 |
| Version | 26.7.0 |
| Revision | daab053ee433 |