Grove.Viewable protocol (Grove v0.1.1)

View Source

Protocol for extracting the current value from a CRDT.

The value is the application-facing view of the CRDT state, stripped of internal metadata used for conflict resolution.

Example

iex> Grove.Viewable.value(counter)
42

Summary

Types

t()

All the types that implement this protocol.

Functions

Returns the current value of the CRDT.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

value(crdt)

@spec value(t()) :: term()

Returns the current value of the CRDT.