pub fn in_storage_layer<T, E, F>(f: F) -> Result<T, E>where
    E: From<DispatchError>,
    F: FnOnce() -> Result<T, E>,
Expand description

Execute the supplied function, ensuring we are at least in one storage layer.

If we are already in a storage layer, we just execute the provided closure. If we are not, we execute the closure within a with_storage_layer.