iteraptor v1.4.1 Iteraptor.Iteraptable 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.

Link to this section Summary

Functions

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

Link to this section Functions

Link to this macro __using__(opts \\ []) View Source (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).