Iteraptor.Iteraptable (iteraptor v1.15.0)

View Source

use Iteraptor.Iteraptable inside structs to make them both Enumerable and Collectable and implement the Access behaviour:

Usage

Use the module within the struct of your choice and this struct will be automagically granted Enumerable and Collectable protocols implementations.

use Iteraptor.Iteraptable accepts keyword parameter skip: Access or skip: [Enumerable, Collectable] which allows to implement a subset of protocols. Also it accepts keyword parameter derive: MyProtocol allowing to specify what protocol(s) implementations should be implicitly derived for this struct.

Summary

Functions

Allows to enable iterating features on structs with use Iteraptor.Iteraptable

Functions

__using__(opts \\ [])

(macro)

Allows to enable iterating features on structs with use Iteraptor.Iteraptable

Parameters

  • keyword parameter opts
    • skip: Access or skip: [Enumerable, Collectable] allows to implement a subset of protocols;
    • derive: MyProtocol allows to derive selected protocol implementation(s).