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 Struct
pubconstDirectory = struct {
source: LazyPath,
dest_rel_path: []constu8,
options: Directory.Options,
pubconstOptions = struct {
/// File paths that end in any of these suffixes will be excluded from installation.exclude_extensions: []const []constu8 = &.{},
/// Only file paths that end in any of these suffixes will be included in installation./// `null` means that all suffixes will be included./// `exclude_extensions` takes precedence over `include_extensions`.include_extensions: ?[]const []constu8 = &.{".h"},
pubfndupe(opts: Directory.Options, graph: *conststd.Build.Graph) Directory.Options {
return .{
.exclude_extensions = graph.dupeStrings(opts.exclude_extensions),
.include_extensions = if (opts.include_extensions) |incs| graph.dupeStrings(incs) elsenull,
};
}
};
pubfndupe(dir: Directory, graph: *conststd.Build.Graph) Directory {
return .{
.source = dir.source.dupe(graph),
.dest_rel_path = graph.dupePath(dir.dest_rel_path),
.options = dir.options.dupe(graph),
};
}
}