Skip to documentation
SLOP

tiny.preserves.SemanticOps

Reference 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.

No direct callersNo direct callsembedded_modSemanticOps
Static calls · unresolved targets: unknown · external targets: unknown.

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

Definitions1
Public names2
Members3
Version26.7.0
Revisiondaab053ee433