Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Builds a map from a list, keeping the FIRST entry for a repeated key and preserving the input order.
Builds a map from a list, keeping the FIRST entry for a repeated key and preserving the input order.
Order is part of this type's meaning - AssocMap is used for fields whose order the ledger fixes, such as TxInfo.redeemers - so the accumulator, which is built by prepending, must be reversed before it is returned.
Attributes
Givens
Givens
AssocMap intentionally has no usable Eq: its equality is order-insensitive (same size, every key maps to an equal value), which is non-structural and cannot be expressed by the structural-equality lowering. This given only produces a clear compile error if someone writes m1 === m2 / m1 == m2, or Eq.derived for a type with an AssocMap field. Use AssocMapEq.equals instead.
AssocMap intentionally has no usable Eq: its equality is order-insensitive (same size, every key maps to an equal value), which is non-structural and cannot be expressed by the structural-equality lowering. This given only produces a clear compile error if someone writes m1 === m2 / m1 == m2, or Eq.derived for a type with an AssocMap field. Use AssocMapEq.equals instead.
Attributes
Extensions
Extensions
Returns the only entry of this map, or fails with message when the map is empty or has more than one entry.
Returns the only entry of this map, or fails with message when the map is empty or has more than one entry.
Attributes
Optionally returns the value associated with a key.
Optionally returns the value associated with a key.
Value parameters
- key
-
the key value
Attributes
- Returns
-
an option value containing the value associated with
keyin this map, orNoneif none exists.
Retrieves the value associated with a key, or fails with a custom message.
Retrieves the value associated with a key, or fails with a custom message.
Mirrors SortedMap.getOrFail, so a map can be switched between the two representations without rewriting its call sites.