UnicodeSecurity.Batch.Groups (UnicodeSecurity v0.1.0)

Copy Markdown View Source

Accumulates eager batch outputs in source enumeration order.

Exact binary identity and computed skeleton keys have separate indexes. Individual results are retained unchanged.

Summary

Functions

Adds one indexed item without changing its result.

Creates empty ordered grouping state.

Types

state()

@type state() :: %{
  results_rev: [UnicodeSecurity.BatchItem.t()],
  by_input: %{optional(binary()) => [non_neg_integer()]},
  input_order_rev: [binary()],
  by_key: %{optional(binary()) => map()},
  key_order_rev: [binary()]
}

Functions

add(state, item)

@spec add(state(), UnicodeSecurity.BatchItem.t()) :: state()

Adds one indexed item without changing its result.

new()

@spec new() :: state()

Creates empty ordered grouping state.