Function frame_support::source ·
storage:: transactional:: with_storage_layer
pub fn with_storage_layer<T, E, F>(f: F) -> Result<T, E>where
F: FnOnce() -> Result<T, E>,
Execute the supplied function, adding a new storage layer.
This is the same as
with_transaction, but assuming that any function returning an
rollback, and any function returning
Ok should commit. This provides a cleaner API to the
developer who wants this behavior.