Skip to documentation
SLOP

tiny.preserves.preservesToPattern

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

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

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

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433