Skip to main content

with_session

Function with_session 

Source
pub fn with_session<F: Future>(
    session: Arc<Session>,
    fut: F,
) -> impl Future<Output = F::Output>
Expand description

Run fut pinned to a session you already hold.

For code that captured a session earlier and wants to finish that account’s work through it — and for tests, which need to read an account’s storage after the live session has moved on.