Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Enum

ToClientTag

Public Enum
std.Build.abi.ToClientTag
pub const ToClientTag = enum(u8)

All WebSocket messages sent by the server to the client begin with a ToClientTag byte. This enum is non-exhaustive only to avoid Illegal Behavior when malformed messages are sent over the socket; unnamed tags are an error condition and should terminate the connection.

Every tag has a curresponding extern struct representing the full message (or a header of the message if it is variable-length). For instance, .hello corresponds to Hello.

When introducing a tag, make sure to add a corresponding extern struct whose first field is this enum, and check its layout in the comptime block above.

File

Build/abi.zig:46
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
pub const ToClientTag = enum(u8) {
    hello,
    status_update,
    step_update,

    // `--fuzz`
    fuzz_source_index,
    fuzz_coverage_update,
    fuzz_entry_points,

    // `--time-report`
    time_report_generic_result,
    time_report_compile_result,
    time_report_run_test_result,

    _,
}