TimeZoneInfo v0.5.0 TimeZoneInfo.DataPersistence behaviour View Source
A behaviour to persist the data.
Link to this section Summary
Callbacks
Returns the checksum for the persisted data.
Returns the persisted data.
Returns the timestamp of the last update in seconds since epoch.
Returns infos about the persisted data.
Persists the given data.
Sets time
as last update time stamp. time
is given in seconds since epoch.
Link to this section Callbacks
Specs
Returns the checksum for the persisted data.
Specs
fetch() :: {:ok, TimeZoneInfo.data()} | {:error, term()}
Returns the persisted data.
Specs
fetch_last_update() :: {:ok, non_neg_integer()} | {:error, term()}
Returns the timestamp of the last update in seconds since epoch.
Specs
info() :: term()
Returns infos about the persisted data.
Specs
put(TimeZoneInfo.data()) :: :ok | {:error, term()}
Persists the given data.
Specs
put_last_update(time :: non_neg_integer()) :: :ok | {:error, term()}
Sets time
as last update time stamp. time
is given in seconds since epoch.