Listex.Item (Listex v0.1.0)

View Source

One element of a list.

  • :id — stable for the whole life of the item (see Listex.ID).
  • :content — any term; Listex never looks inside it.
  • :rev — bumped on every :update of this item. Handy for spotting a write that landed after the one you were rendering.

Summary

Functions

Builds an item, generating an id unless one is given.

Types

t()

@type t() :: %Listex.Item{content: term(), id: Listex.ID.t(), rev: non_neg_integer()}

Functions

new(content, id \\ nil)

@spec new(term(), Listex.ID.t() | nil) :: t()

Builds an item, generating an id unless one is given.