tiny.preserves.dictionary
Defined in tiny.preserves.
Makes a dictionary holding a copy of the slice entries, sorted in ascending order of their keys under compare.
Source
Source: lib/preserves/src/any.zig:177
zig
/// Makes a dictionary holding a copy of the slice `entries`, sorted in ascending order of their/// keys under `compare`. Code that builds a dictionary by hand calls it, so repeated keys are/// refused and the storage comes out sorted by key. The duplicate check compares each key with/// every key before it, so its cost grows with the square of the entry count. The copy is one level/// deep: the dictionary shares everything the keys and values point to, and `freeValue` frees/// exactly the slice. The call returns `error.DuplicateDictionaryKey` before it allocates when two/// keys are equal.pub const dictionary = any_constructors.dictionary;Source: lib/preserves/src/root.zig:199
zig
pub const dictionary = any.dictionary;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |