(&mut self)
| 778 | /* Charge one unit against the op budget; for native loops (custom-iterator drain, generator collect) that bypass the dispatch back-edge counter. */ |
| 779 | #[inline] |
| 780 | pub(crate) fn charge_step(&mut self) -> Result<(), VmErr> { |
| 781 | if !self.sandbox_off { |
| 782 | if self.budget == 0 { return Err(cold_budget()); } |
| 783 | self.budget -= 1; |
| 784 | } |
| 785 | Ok(()) |
| 786 | } |
| 787 | |
| 788 | /* Charge `n` units at once; for native builtins (sort, materialise) whose cost scales with input size. */ |
| 789 | #[inline] |
no test coverage detected