tiny.preserves.isRecord
Defined in tiny.preserves.
Returns whether v is a record whose label is the symbol label and whose field count is arity.
Source
Source: lib/preserves/src/any.zig:214
zig
/// Returns whether `v` is a record whose label is the symbol `label` and whose field count is/// `arity`. Code that dispatches on record labels calls it, as the Observe accessors do. A `null`/// label or arity skips that check. A record whose label holds a value other than a symbol fails/// every label check.pub fn isRecord(v: AnyValue, label: ?Symbol, arity: ?usize) bool { const name: ?[]const u8 = if (label) |l| l.name else null; return predicates.isRecord(embedded_mod.AnyEmbedded, v, name, arity);}Source: lib/preserves/src/root.zig:206
zig
pub const isRecord = any.isRecord;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |