Skip to main content

MAP_ENTRY

Constant MAP_ENTRY 

Source
pub const MAP_ENTRY: BuiltinSchema;
Expand description

MapEntry<K, V>: the one key/value pair a Map is built from and iterated as.

It is the second builtin struct, and the only builtin whose initializer is labelled: MapEntry(key: "a", value: 1) is the synthesized labelled call a declared struct gets, and its labels are the two fields below, read by both ends rather than written out at each. It is not a namespace, because nothing is called on the name — Map.of collects the pairs and a for over a Map binds them.