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

存储器适配器

Summary

Types

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

存储器

@type value() :: map()

Callbacks

Link to this callback

restore(store_id, store_key)

View Source
@callback restore(store_id(), store_key()) :: {:ok, value()} | any()
Link to this callback

store(store_id, store_key, value)

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