pub struct Watchdog { /* private fields */ }Expand description
The armed budget’s watchdog thread; stops it when dropped.
Implementations§
Source§impl Watchdog
impl Watchdog
Sourcepub fn finish(&mut self) -> Result<Option<Exhausted>, MeasurementError>
pub fn finish(&mut self) -> Result<Option<Exhausted>, MeasurementError>
Checks the clock and takes the final memory sample before publishing a result. Only the watchdog’s owning entry point calls this; nested armed calls do not.
§Errors
Returns a typed failure when memory measurement is unavailable.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Watchdog
impl !UnwindSafe for Watchdog
impl Forget for Watchdog
impl Freeze for Watchdog
impl Move for Watchdog
impl Send for Watchdog
impl Sync for Watchdog
impl Unpin for Watchdog
impl UnsafeUnpin for Watchdog
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