pub struct PatientGuard { /* private fields */ }Expand description
RAII guard returned by ToolCtx::patient.
While held, the kernel’s script-level timeout watchdog is suspended for this execution: the script clock freezes and the guard’s own budget governs instead. Dropping the guard resumes the script clock with the remaining time it had at acquire.
The inner box is the kernel’s hold object; its Drop does the restore.
An inert guard (no watchdog running — e.g. the kernel has no script
timeout, or a non-kernel test context) holds nothing and drops as a no-op.
Implementations§
Source§impl PatientGuard
impl PatientGuard
Auto Trait Implementations§
impl !RefUnwindSafe for PatientGuard
impl !Sync for PatientGuard
impl !UnwindSafe for PatientGuard
impl Freeze for PatientGuard
impl Send for PatientGuard
impl Unpin for PatientGuard
impl UnsafeUnpin for PatientGuard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more