apply<R> abstract method
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
- Capability Scrutiny: The command's function is checked against
the modifiable whitelist; the receipt's
vettedflag records the result. - Transaction Staging: With a
txscope the command is enqueued via ApplyTransactionScope.enqueueCommand and the outcome is ApplyStaged. - 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,
});