Search documentation of Orchid

# Orchid.Param (Orchid v0.3.3)

View Source

Defines the standard data unit for sequence parameters.

The purpose of this module is to abstract parameter handling and define a consistent interface for data exchange. This standardization allows developers using `Orchid` to focus on their business logic rather than the details of data flow management.

# Summary

## Types

name()
param_type()
payload()
raw_payload()
ref_payload()
t()

## Functions

get_payload(param)
new(name, type, payload \\ nil, metadata \\ %{})
set_payload(param, new_payload)

# Types

# name()

    @type name() :: term()

# param_type()

    @type param_type() :: atom() | module()

# payload()

    @type payload() :: raw_payload() | ref_payload()

# raw_payload()

    @type raw_payload() :: any() | nil

# ref_payload()

    @type ref_payload() :: {:ref, module() | pid(), term()}

# t()

    @type t() :: %Orchid.Param{
      metadata: map(),
      name: name(),
      payload: payload(),
      type: param_type()
    }

# Functions

# get_payload(param)

    @spec get_payload(t()) :: payload()

# new(name, type, payload \\ nil, metadata \\ %{})

    @spec new(name(), param_type(), payload(), %{}) :: t()

# set_payload(param, new_payload)

    @spec set_payload(t(), payload()) :: t()