tiny.preserves.SemanticOps
Defined in embedded_mod.
One table of equality, hash and order functions over untyped payload pointers.
API (3)
Fields and members
Public fields and members.
Source
Source: lib/preserves/src/embedded.zig:44
zig
/// One table of equality, hash and order functions over untyped payload pointers. Code that embeds/// its own objects fills one table per object kind, so equality, order and hash agree. Two embedded/// values use the table only when both point to the same table. The table's order must be total,/// its equality must hold exactly when the order returns `.eq`, and equal payloads must hash/// equally. Tables are compared by address, so one table serves every payload of one kind.pub const SemanticOps = struct { /// Returns whether two payloads are equal. The function must return `true` exactly when `order` /// returns `.eq`. eql: *const fn (*anyopaque, *anyopaque) bool, /// Returns the 64-bit hash of one payload. Equal payloads must hash equally. hash: *const fn (*anyopaque) u64, /// Returns the order of one payload against another. The order must be total. order: *const fn (*anyopaque, *anyopaque) std.math.Order,};Source: lib/preserves/src/root.zig:161
zig
pub const SemanticOps = embedded_mod.SemanticOps;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 3 |
| Version | 26.7.0 |
| Revision | daab053ee433 |