Iteraptable protocol (iteraptor v1.15.0)

View Source

The protocol specifying how the respective struct might be used within Iteraptor.

Experimental. By implementing this protocol one might change the behaviour of nested objects regarding how they should be iterated through.

Summary

Types

t()

All the types that implement this protocol.

Functions

Returns a name of the term to be represented in flatmaps

Converts a term to a collectable

Converts a term to an enumerable

Returns a type understood by Iteraptable

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

name(term)

@spec name(term :: any()) :: binary()

Returns a name of the term to be represented in flatmaps

to_collectable(term)

@spec to_collectable(term :: any()) :: Collectable.t()

Converts a term to a collectable

to_enumerable(term)

@spec to_enumerable(term :: any()) :: Enumerable.t()

Converts a term to an enumerable

type(term)

@spec type(term :: any()) :: atom()

Returns a type understood by Iteraptable