Function entity::global::with_db[][src]

pub fn with_db<D: Database + 'static, F: FnMut() -> R, R>(
    database: D,
    f: F
) -> R

Executes the given function with the provided database as the new, global database, destroying the database once the function completes; locks execution of this function, only allowing one call to with_db at a time