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.
pubconstRange = struct {
min: Version,
max: Version,
pubfnincludesVersion(self: Range, ver: Version) bool {
if (self.min.order(ver) == .gt) returnfalse;
if (self.max.order(ver) == .lt) returnfalse;
returntrue;
}
/// Checks if system is guaranteed to be at least `version` or older than `version`./// Returns `null` if a runtime check is required.pubfnisAtLeast(self: Range, ver: Version) ?bool {
if (self.min.order(ver) != .lt) returntrue;
if (self.max.order(ver) == .lt) returnfalse;
returnnull;
}
}