apply<R> abstract method

  1. @override
FutureOr<ApplyOutcome<R>> apply<R>(
  1. ApplyCommand command, {
  2. ApplyTransactionScope? tx,
})
override

Executes a governed mutation on this tissue through the command gateway.

This is the forensic command-model entry point for all structural changes (e.g., adding elements, clearing the collection). The command routes through the tissue mutation dispatch engine, is validated by the testRule, and returns an auditable ApplyOutcome.

How it works

  1. Capability Scrutiny: The command's function is checked against the modifiable whitelist; the receipt's vetted flag records the result.
  2. Transaction Staging: With a tx scope the command is enqueued via ApplyTransactionScope.enqueueCommand and the outcome is ApplyStaged.
  3. Dispatch Execution: Without a scope the command is routed through the collection-specific dispatch engine; a rejected mutation maps to ApplyRejected, a successful one to ApplyAccepted.

Returns:

An ApplyOutcome carrying the mutation result and a forensic ApplyReceipt.

Implementation

@override
FutureOr<ApplyOutcome<R>> apply<R>(ApplyCommand command, {
  ApplyTransactionScope? tx,
});