pub fn state_write<S, R, E>(
storage: &S,
operation: impl FnOnce(&mut StateTx<'_, <S as XmtpMlsStorageProvider>::TxQuery>) -> Result<TransactionOutcome<R>, E>,
) -> Result<TransactionOutcome<R>, E>Expand description
Acquire the cross-process writer before exposing state or keys.
An error rolls back all writes. An explicit rollback is useful for trials; the caller must keep only immutable requirements from such a trial.