Module tvix_eval::value::attrs

source ยท
Expand description

This module implements Nix attribute sets. They have flexible backing implementations, as they are used in very versatile use-cases that are all exposed the same way in the language surface.

Due to this, construction and management of attribute sets has some peculiarities that are encapsulated within this module.

Structsยง

Enumsยง

  • AttrsRep ๐Ÿ”’
  • Internal representation of an owning attrset iterator
  • Internal helper type to track the iteration status of an iterator over the name/value representation.
  • Iterator representation over the keys and values of an attribute set.
  • KeysInner ๐Ÿ”’

Functionsยง

  • In Nix, name/value attribute pairs are frequently constructed from literals. This particular case should avoid allocation of a map, additional heap values etc. and use the optimised KV variant instead.
  • set_attr ๐Ÿ”’
    Set an attribute on an in-construction attribute set, while checking against duplicate keys.