time_zone_info v0.1.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.

Persists the given data.

Sets time as last update time stamp. time is given in seconds since epoch.

Link to this section Callbacks

Link to this callback

checksum()

View Source
checksum() :: {:ok, binary()} | {:error, :no_data} | {:error, term()}

Returns the checksum for the persisted data.

Link to this callback

fetch()

View Source
fetch() :: {:ok, TimeZoneInfo.data()} | {:error, term()}

Returns the persisted data.

Link to this callback

fetch_last_update()

View Source
fetch_last_update() :: {:ok, non_neg_integer()} | {:error, term()}

Returns the timestamp of the last update in seconds since epoch.

Link to this callback

put(arg1)

View Source
put(TimeZoneInfo.data()) :: :ok | {:error, term()}

Persists the given data.

Link to this callback

put_last_update(time)

View Source
put_last_update(time :: non_neg_integer()) :: :ok | {:error, term()}

Sets time as last update time stamp. time is given in seconds since epoch.