Elixpath.Access protocol (elixpath v0.1.3)

Used for querying each data type.

Link to this section Summary

Types

t()

All the types that implement this protocol.

Functions

Fetches all children that matches key from data.

Link to this section Types

@type t() :: term()

All the types that implement this protocol.

Link to this section Functions

Link to this function

query(data, key, opts)

@spec query(data :: term(), key :: Elixpath.Tag.wildcard() | term(), opts :: list()) ::
  {:ok, [matched :: term()]} | {:error, reason :: term()}

Fetches all children that matches key from data.

key can be Elixpath.Tag.wildcard() (i.e. :elixpath_wildcard), which stands for "all the children"