pub async fn commit_audited(
store: &dyn CharterStore,
draft: Charter,
decision: CommitDecision,
trail: Option<&AuditTrail>,
) -> Result<CharterVersion>Expand description
Commits draft by decision on store as CharterStore::commit does, and records the
outcome on trail (spec 3.5 §9.3): website.approval_chain.satisfied and
website.charter.committed for a commit, website.approval_chain.refused for a decision
whose chain is not satisfied. The records name the approvers and the decision, never the
charter’s text.
§Example
ⓘ
let version = commit_audited(store.as_ref(), draft, decision, Some(&trail)).await?;