track_once_cell_new

Function track_once_cell_new 

Source
pub fn track_once_cell_new<T>(
    name: &str,
    location: &str,
    value: OnceCell<T>,
) -> OnceCell<T>
Expand description

Track static variable initialization.

Records a StaticInit event. Use this when a static variable is first initialized.

§Arguments

  • var_name - Name of the static variable
  • var_id - Unique identifier for the variable
  • type_name - Type of the static variable
  • is_mutable - Whether this is a static mut
  • value - The initial value (returned unchanged)

§Returns

The input value, unchanged.