TypedStructor.Plugins.Accessible (TypedStructor v0.1.3)
This plugin implements the Access behavior for the struct
by delegating the fetch/2, get_and_update/3, and pop/2
functions to the Map module.
Destructive operations
These operations are not allowed for the struct:
- update
:__struct__key- pop a key
The functions will raise an
ArgumentErrorif called. To enable these functionalities, override theget_and_update/3andpop/2functions.
Usage
typed_structor do
plugin TypedStructor.Plugins.Accessible
# fields
end