struct Range [src]

Fields

min: Version
max: Version

Members

Source

pub const Range = struct { min: Version, max: Version, pub fn includesVersion(self: Range, ver: Version) bool { if (self.min.order(ver) == .gt) return false; if (self.max.order(ver) == .lt) return false; return true; } /// Checks if system is guaranteed to be at least `version` or older than `version`. /// Returns `null` if a runtime check is required. pub fn isAtLeast(self: Range, ver: Version) ?bool { if (self.min.order(ver) != .lt) return true; if (self.max.order(ver) == .lt) return false; return null; } }