Skip to documentation
SLOP

tiny.preserves.mapEmbedded

Reference tiny.preserves mapEmbedded

Defined in tiny.preserves.

Returns a copy of v in which each embedded value e is replaced by the value map_fn(context, alloc, e) returns.

No direct callersNo direct callstiny.preservesmapEmbedded
Static calls · unresolved targets: 0 · external targets: 1.

Source

Source: lib/preserves/src/any.zig:348

zig
/// Returns a copy of `v` in which each embedded value `e` is replaced by the value/// `map_fn(context, alloc, e)` returns. Code that swaps host objects inside a value for data calls/// it for a new tree with each one replaced. The copy has new compound storage from `alloc` and/// shares every atom with `v`. A set in the copy keeps the input's storage order and skips checking/// again for duplicates. On an error from `map_fn` or from `alloc`, the storage built before the/// failure is never freed.pub fn mapEmbedded(    alloc: std.mem.Allocator,    v: AnyValue,    context: anytype,    map_fn: anytype,) !AnyValue {    return any_conversions.mapEmbedded(alloc, v, context, map_fn);}

Source: lib/preserves/src/root.zig:230

zig
pub const mapEmbedded = any.mapEmbedded;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433