bindLowerComponentFunction method

Binds a canonical lower plan to the component function it wraps.

Implementation

WASIComponentCanonicalAdapterOperation bindLowerComponentFunction(
  WASIComponentCanonicalAdapterPlan plan,
  WASIComponentCanonicalAdapterCallback componentFunction,
) {
  _requireAdapterKind(plan, WasmComponentCanonicalKind.lower);
  _checkDirectValuePlan(plan);
  return WASIComponentCanonicalAdapterOperation._(
    plan: plan,
    callback: componentFunction,
    directValueSupported: true,
    memoryValueSupported: _supportsMemoryValuePlan(plan),
  );
}