Class MapManager<TKey, TValue, TKeySequenceManager, TArray>

Manages a Map in storage.

Type Parameters

  • TKey

    The type of the key used to store the value.

  • TValue

    The type of the value stored.

  • TKeySequenceManager = u8

    The type of the key sequence manager.

  • TArray = void

    When value is an array of serializable, the underlying serializable type.

Hierarchy

  • MapManager

Constructors

Properties

Methods

Constructors

Properties

keyPrefix: StaticArray<number>

Methods

  • Retrieves the value from storage and panics in case of failure.

    Returns

    the value stored.

    Throws

    if the key is not found in storage.

    Throws

    if the value is not found in storage.

    Parameters

    • key: TKey

    Returns TValue

  • Sets the value in storage.

    Parameters

    • key: TKey
    • value: TValue

      The value to store. Must be an A

    Returns void

  • Retrieves the value from storage and returns a result.

    Returns

    the value stored wrapped in a result.

    Parameters

    • key: TKey

    Returns Result<TValue>

Generated using TypeDoc