tiny.preserves.NoEmbedded
Defined in domain.
A type of embedded values whose one value carries no data, for programs that embed nothing.
API (4)
Actions
Public operations.
clone: Returns the value itself and allocates nothing.deinit: Does nothing, since the value owns nothing.eql: Returnstruefor any two values.order: Returns.eqfor any two values.
Source
Source: lib/preserves/src/domain.zig:50
zig
/// A type of embedded values whose one value carries no data, for programs that embed nothing. Code/// with nothing to embed passes it to `Value`, as the binary reader's tests do. Every two of its/// values are equal.pub const NoEmbedded = struct { /// Returns `true` for any two values. `Value.eql` calls it for two embedded values of this /// type. pub fn eql(a: NoEmbedded, b: NoEmbedded) bool { _ = a; _ = b; return true; } /// Returns `.eq` for any two values. `Value.compare` calls it for two embedded values of this /// type. pub fn order(a: NoEmbedded, b: NoEmbedded) std.math.Order { _ = a; _ = b; return .eq; } /// Does nothing, since the value owns nothing. `Value.deinit` calls it for an embedded value of /// this type. pub fn deinit(self: *NoEmbedded, allocator: Allocator) void { _ = self; _ = allocator; } /// Returns the value itself and allocates nothing. `cloneValueDeep` calls it for an embedded /// value of this type. The call never fails, though its type carries an error union for the /// rule's signature. pub fn clone(self: NoEmbedded, allocator: Allocator) !NoEmbedded { _ = allocator; return self; }};Source: lib/preserves/src/root.zig:134
zig
pub const NoEmbedded = domain.NoEmbedded;Also reachable as
constructors_mod.NoEmbedded, ownership.NoEmbedded, patterns_mod.NoEmbedded, predicates.NoEmbedded, records_mod.NoEmbedded, value.NoEmbedded.
Audit
| Definitions | 5 |
|---|---|
| Public names | 40 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |