View Source Tempus.Slots.Group protocol (Tempus v0.15.0)
The protocol to implement for the ordered collection of slots.
Summary
Functions
Adds a single t:Slot.t/0
instance to this t:Slots.t/1
(which is effectively Slots.t(t())
)
implementation. If merge/3
implementation returns {:error, __MODULE__}
,
this function would be used to add elements one by one through reduce/3
.
Flattens the implementation, returning the list back.
The function returning the identity element, which can be merged into each and every implementation without changing it.
Efficient implementation of inversing slots. If this function
returns {:error, __MODULE__}
, the reduce/3
will be used instead.
Efficient implementation of merging slots. If this function
returns {:error, __MODULE__}
, the reduce/3
will be used instead.
Efficient implementation of splitting slots. If this function
returns {:error, __MODULE__}
, the reduce/3
will be used instead.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec add(t(), Tempus.Slot.origin(), keyword()) :: t()
Adds a single t:Slot.t/0
instance to this t:Slots.t/1
(which is effectively Slots.t(t())
)
implementation. If merge/3
implementation returns {:error, __MODULE__}
,
this function would be used to add elements one by one through reduce/3
.
@spec flatten( t(), keyword() ) :: [Tempus.Slot.t()]
Flattens the implementation, returning the list back.
The function returning the identity element, which can be merged into each and every implementation without changing it.
Efficient implementation of inversing slots. If this function
returns {:error, __MODULE__}
, the reduce/3
will be used instead.
Efficient implementation of merging slots. If this function
returns {:error, __MODULE__}
, the reduce/3
will be used instead.
Efficient implementation of splitting slots. If this function
returns {:error, __MODULE__}
, the reduce/3
will be used instead.