[][src]Function win_etw_provider::with_activity

pub fn with_activity<F: FnOnce() -> R, R>(f: F) -> R

Allows an application to enter a nested activity scope. This creates a new activity ID, sets this activity ID as the current activity ID of the current thread, and then runs the provided function. After the function finishes, it restores the activity ID of the calling thread (even if a panic occurs).

See [EventActivityIdControl](https://docs.microsoft.com/en-us/windows/win32/api/evntprov/nf-evntprov-eventactivityidcontrol).