View Source WeChat.Storage.Adapter behaviour (wechat v0.18.0)

存储器适配器

Summary

Types

store_id()

@type store_id() :: String.t()

store_key()

@type store_key() :: atom() | String.t()

t()

@type t() :: module()

存储器

value()

@type value() :: map()

Callbacks

restore(store_id, store_key)

@callback restore(store_id(), store_key()) :: {:ok, value()} | any()

store(store_id, store_key, value)

@callback store(store_id(), store_key(), value()) :: :ok | any()