Theoria.Normalize.Fuel (theoria v0.4.0)

Copy Markdown View Source

Shared fuel budget for normalization.

Summary

Functions

Builds a fuel budget from normalization options.

Consumes one normalization step.

Types

t()

@type t() :: %Theoria.Normalize.Fuel{
  max_steps: pos_integer(),
  remaining_steps: non_neg_integer()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Builds a fuel budget from normalization options.

spend(fuel)

@spec spend(t()) :: {:ok, t()} | {:error, Theoria.Error.t()}

Consumes one normalization step.