Skip to documentation
SLOP

tiny.preserves.cloneValueDeep

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

Called byCallsNo direct callersownershipcloneValueDeeptiny.preservescloneValueDeep
Static calls · unresolved targets: 0 · external targets: 0.

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

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433