View Source Kinda.Wrapper.CallbackBridge (kinda v0.11.0)

Metadata for wrapper entries that require a callback-bridge layer.

Pending and runtime-backed entries share this contract, so callback-backed declarations stay in the same resolved declaration surface as ordinary generated NIFs while retaining their ownership and scheduler requirements.

Summary

Functions

Marks a callback declaration as resolved by Kinda's dispatcher runtime.

Types

destructor()

@type destructor() ::
  :reply_token_resource | :consumer_callback | :native_owner | :unspecified

facet()

@type facet() ::
  :beam_callback
  | :lifetime_contract
  | :scheduler_contract
  | :rich_input_decoder

function_name()

@type function_name() :: atom()

lifetime()

@type lifetime() :: :invocation | :registration | :native_owner | :unspecified

owner()

@type owner() :: :beam_process | :native_owner | :unspecified

reason()

@type reason() :: :callback_bridge_required | nil

runtime()

@type runtime() :: :pending | :dispatcher

scheduler()

@type scheduler() :: :normal | :dirty_cpu | :dirty_io | :foreign_thread | :unspecified

t()

@type t() :: %Kinda.Wrapper.CallbackBridge{
  destructor: destructor(),
  facets: [facet()],
  function: function_name(),
  lifetime: lifetime(),
  owner: owner(),
  reason: reason(),
  runtime: runtime(),
  runtime_backed: boolean(),
  scheduler: scheduler(),
  timeout_ms: non_neg_integer() | nil,
  unblock_path: unblock_path()
}

unblock_path()

@type unblock_path() :: :callback_bridge_runtime | nil

Functions

required(function, opts \\ [])

@spec required(
  function_name(),
  keyword()
) :: t()

runtime_backed(function, opts \\ [])

@spec runtime_backed(
  function_name(),
  keyword()
) :: t()

Marks a callback declaration as resolved by Kinda's dispatcher runtime.

Runtime-backed entries are not generation blockers. Consumers still own the ABI trampoline and type projection named by their declaration variant.