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.
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
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |