ExpressibleByDictionaryLiteral
public protocol ExpressibleByDictionaryLiteralUser-facing protocol for dictionary-literal lowering. Mirrors
ExpressibleByArrayLiteral but for key-value pairs.
Initializers
init(dictionaryLiteral: LiteralSlice[(Key, Value)])
init(dictionaryLiteral: LiteralSlice[(Key, Value)])Builds an instance from a literal slice of key-value pairs.
Implements_ExpressibleByDictionaryLiteral
Associated Types
type Key
type Keytype Value
type ValueInitializers
init(consuming lang.ptr[(Key, Value)], consuming lang.i64)
init(consuming lang.ptr[(Key, Value)], consuming lang.i64)Compiler-emitted init taking a raw (Key, Value) pointer and count.
Both params are consuming for the same reason as the array
bridge: the compiler hands ownership of the stack buffer to the
implementation. MIR lowering matches on the unwrapped param
shape, so an impl that deviates from this convention will be
skipped during literal lowering.
Defined in lang/std/core/literals.ks