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.

statusUpdateMessage

main.statusUpdateMessage
fn statusUpdateMessage(msg_bytes: []u8) Allocator.Error!void

File

lib/build-web/main.zig:166

Code

fn statusUpdateMessage(msg_bytes: []u8) Allocator.Error!void {
    if (msg_bytes.len < @sizeOf(abi.StatusUpdate)) @panic("malformed StatusUpdate message");
    const msg: *const abi.StatusUpdate = @ptrCast(msg_bytes[0..@sizeOf(abi.StatusUpdate)]);
    js.updateBuildStatus(msg.new);
}