Skip to main content

enter

Function enter 

Source
pub fn enter(name_id: u32) -> Guard
Expand description

Enter a profiled function. Returns a Guard that aggregates on drop.

Reads profiling context from &’static ProfileSession. No function parameters needed. No closure captures created.

If profiling is not active (ProfileSession not initialized), returns an inactive Guard whose drop is a no-op.