Skip to main content

dispatch_prepared_call

Function dispatch_prepared_call 

Source
pub fn dispatch_prepared_call<'g>(
    registry: &ExtensionRegistry<'_>,
    handle: &PreparedCallHandle,
    ctx: &CallExecutionContext,
    gate: Option<&mut (dyn SentinelPolicyGate + 'g)>,
    inputs: &[BorrowedSliceView<'_>],
    output: &mut CallerOutputSlice<'_>,
) -> Result<DispatchOutcome, VibeTrap>
Expand description

Executes a PreparedCallHandle in zero heap allocations (Tier-1 HotZeroHeap).

Enforces:

  1. RegistryGeneration freshness (StaleRegistryGeneration on mismatch).
  2. contract_digest integrity (ContractDigestMismatch).
  3. Parameter arity, type, and element count bounds (ArityMismatch, TypeMismatch, SliceLengthMismatch).
  4. Pre-dispatch output buffer capacity (OutputBufferTooSmall) before any admission or side effects.
  5. Mode-specific Sentinel admission (GovernedApplication, StandaloneDeveloper, SimulatedGovernanceTest, IntegratedGovernanceTest).
  6. Post-execution validation and fail-closed receipt persistence (ReceiptPersistenceFailed).