tiny.preserves.cloneValueDeep
Defined in tiny.preserves.
Copies v all the way down into storage from alloc: atom bytes, integer digits, bind names and compound storage.
Source
Source: lib/preserves/src/any.zig:123
zig
/// Copies `v` all the way down into storage from `alloc`: atom bytes, integer digits, bind names/// and compound storage. Code that keeps a value past the life of its source calls it for a copy/// that owns every byte. A set or dictionary copy keeps the original's storage order. Each embedded/// payload is copied by its copy function. A payload with no copy function and no free function/// stays shared with the original. The call panics on a payload that has a free function and no/// copy function. `Value.deinit` with the same allocator frees the copy. On `error.OutOfMemory` the/// call frees every partial copy and leaves `v` unchanged.pub fn cloneValueDeep(alloc: std.mem.Allocator, v: AnyValue) std.mem.Allocator.Error!AnyValue { return ownership.cloneValueDeep(embedded_mod.AnyEmbedded, alloc, v);}Source: lib/preserves/src/root.zig:187
zig
pub const cloneValueDeep = any.cloneValueDeep;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |