tiny.preserves.preservesToPattern
Defined in tiny.preserves.
Reads a pattern written as records and returns it as pattern values, with the same mapping as preservePattern.
Source
Source: lib/preserves/src/any.zig:312
zig
/// Reads a pattern written as records and returns it as pattern values, with the same mapping as/// `preservePattern`. Code that receives a pattern in record form calls it for pattern values, with/// allocation failure reported. `<lit V>`, the labels of plain records and dictionary keys come/// back as new copies of their compound storage and integer digits. `freeValueDeep` frees the/// result. Sets, integers, other atoms, embedded values and the labels and keys of `<group>`/// records come back as the input's own values, so `freeValueDeep` on the result also frees the/// input's sets and large-integer digits. On `error.OutOfMemory` most paths free what they built./// The `<group>` paths and the `<bind P>` path leak it.pub fn preservesToPattern(alloc: std.mem.Allocator, v: AnyValue) !AnyValue { return any_conversions.preservesToPattern(alloc, v);}Source: lib/preserves/src/root.zig:226
zig
pub const preservesToPattern = any.preservesToPattern;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |