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.
pubconstFetchOptions = struct {
/// `null` means it will be heap-allocated. RFC 9110 recommends at least/// 8000 bytes.redirect_buffer: ?[]u8 = null,
/// `null` means it will be heap-allocated.decompress_buffer: ?[]u8 = null,
redirect_behavior: ?Request.RedirectBehavior = null,
/// If the server sends a body, it will be written here.response_writer: ?*Writer = null,
location: Location,
method: ?http.Method = null,
payload: ?[]constu8 = null,
raw_uri: bool = false,
keep_alive: bool = true,
/// Standard headers that have default, but overridable, behavior.headers: Request.Headers = .{},
/// These headers are kept including when following a redirect to a/// different domain./// Externally-owned; must outlive the Request.extra_headers: []consthttp.Header = &.{},
/// These headers are stripped when following a redirect to a different/// domain./// Externally-owned; must outlive the Request.privileged_headers: []consthttp.Header = &.{},
pubconstLocation = union(enum) {
url: []constu8,
uri: Uri,
};
}