Skip to main content

state_write_with_events

Function state_write_with_events 

Source
pub fn state_write_with_events<S, R, E>(
    storage: &S,
    bus: &EventBus<InternalEvent>,
    operation: impl FnOnce(&mut StateTx<'_, <S as XmtpMlsStorageProvider>::TxQuery>, &EventBuffer<'_, InternalEvent>) -> Result<TransactionOutcome<R>, E>,
) -> Result<TransactionOutcome<R>, E>
where S: XmtpMlsStorageProvider, E: From<Error> + From<ConnectionError> + Error,
Expand description

Flush this write’s events only after its database transaction commits.