Skip to main content

track_usage

Attribute Macro track_usage 

Source
#[track_usage]
Expand description

Call a lightweight usage recorder on entry to a function or impl method. Place this before pymethods/pyfunction. Class attributes run during module registration, so they deliberately do not count as user operations. With on_success, record after returning normally (and only for Ok on Result/PyResult methods). Getters and Python inspection hooks are skipped.