Access protocol

The Access protocol is the underlying protocol invoked when the brackets syntax is used. For instance, foo[bar] is translated to access foo, bar which, by default, invokes the Access.access protocol.

This protocol is limited and is implemented only for the following built-in types: keywords, records and functions.

Source

Summary

access(container, key)

Receives the element being accessed and the access item

impl_for!(data)
impl_for(data)

Types

t :: term

Functions

access(container, key)

Receives the element being accessed and the access item.

Source
impl_for(data)

Specs:

  • impl_for(term) :: module | nil
Source
impl_for!(data)

Specs:

  • impl_for!(term) :: module | no_return
Source