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.
pubconstinotify_event = externstruct {
wd: i32,
mask: u32,
cookie: u32,
len: u32,
//name: [?]u8,
// if an event is returned for a directory or file inside the directory being watched
// returns the name of said directory/file
// returns `null` if the directory/file is the one being watched
pubfngetName(self: *constinotify_event) ?[:0]constu8 {
if (self.len == 0) returnnull;
returnstd.mem.span(@as([*:0]constu8, @ptrCast(self)) + @sizeOf(inotify_event));
}
}