[][src]Function topo::call

pub fn call<R>(op: impl FnOnce() -> R) -> R

Calls the provided expression with an Id specific to the callsite.

let prev = topo::Id::current();
topo::call(|| assert_ne!(prev, topo::Id::current()));