Function atomically

Source
pub fn atomically<T>(f: impl FnOnce() -> T) -> T
Expand description

Executes the given function as an atomic operation.

In case of a failure, the whole operation will be re-executed during retry.