pub unsafe fn task_callbacks<FBefore, FEnter, FExit, FAfter>(
before: FBefore,
enter: FEnter,
exit: FExit,
after: FAfter,
)Expand description
§Safety
The user must ensure that the pointer returned by before has a 'static lifetime.
This pointer will be owned by the spawned task for the duration of that task, and
ownership will be returned to the user at the end of the task via after.
The pointer remains opaque to the runtime.
§Panics
Panics if task callbacks have already been set.