pub struct MemoryPressureMonitor { /* private fields */ }
Expand description
Memory pressure monitor
Implementations§
Source§impl MemoryPressureMonitor
impl MemoryPressureMonitor
pub fn new(total_memory: usize, threshold_percent: f32) -> Self
pub fn set_callback<F>(&mut self, callback: F)
pub fn check_pressure( &self, current_usage: usize, ) -> Option<MemoryPressureEvent>
Auto Trait Implementations§
impl Freeze for MemoryPressureMonitor
impl !RefUnwindSafe for MemoryPressureMonitor
impl Send for MemoryPressureMonitor
impl Sync for MemoryPressureMonitor
impl Unpin for MemoryPressureMonitor
impl !UnwindSafe for MemoryPressureMonitor
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