Zig 0.17.0-dev (Split by item)

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 library itself.

ToClientTag

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.

abi.ToClientTag
pub const ToClientTag = enum(u8)

File

lib/std/Build/abi.zig:46

Code

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,

    _,
}