track_cell_get

Function track_cell_get 

Source
pub fn track_cell_get<T: Copy>(cell_id: &str, location: &str, value: T) -> T
Expand description

Track Cell::get operation.

Records a CellGet event. Use this when reading a value from a Cell.

§Arguments

  • cell_id - Identifier of the Cell being read
  • location - Source location (e.g., “file.rs:42”)
  • value - The value read from the Cell (returned unchanged)

§Returns

The input value, unchanged.

§Examples

use std::cell::Cell;

let counter = track_cell_new("counter", Cell::new(42));
let value = track_cell_get("counter", "main.rs:5", counter.get());
assert_eq!(value, 42);