#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_depletion_update(
depletion: *mut PamojaDepletion,
level: f32,
out_samples: *mut u32,
) -> boolExpand description
Records a level and estimates how many samples remain before the threshold.
§Returns
true if an estimate is available, having written it to out_samples: 0 once
the level is at or below the threshold, the first reading included. false if
the level is steady or rising, on a first reading above the threshold, when no
rate is known yet, for a level that is not a finite number, or if depletion
is null.
§Safety
depletion must be a live handle from pamoja_depletion_new, or null, and
out_samples must point to a writable uint32_t or be null.