Contents

Dictionary.Index

The position of a key-value pair in a dictionary.

Declaration

@frozen struct Index

Overview

Dictionary has two subscripting interfaces:

  1. Subscripting with a key, yielding an optional value:

    v = d[k]!
  2. Subscripting with an index, yielding a key-value pair:

    (k, v) = d[i]

Topics

Default Implementations

See Also

Supporting Types