Lux.Prisms.NoOp (Lux v0.5.0)

View Source

A no-operation prism that simply returns its input or an empty map if no input. Used as a placeholder in conditional branches where no action is needed.

Example

iex> Lux.Prisms.NoOp.run(%{value: 42})
{:ok, %{value: 42}}

iex> Lux.Prisms.NoOp.run(%{})
{:ok, %{}}

Summary

Functions

Callback implementation for Lux.Prism.handler/2.

Returns the Prism struct for this module.

Functions

handler(input, ctx)

Callback implementation for Lux.Prism.handler/2.

run(input, context \\ nil)

view()

Returns the Prism struct for this module.