pub struct AllocThresholds {
pub current: Threshold<usize>,
pub peak: Threshold<usize>,
pub total_size: Threshold<usize>,
pub total_num: Threshold<usize>,
pub reallocs: Threshold<usize>,
}Expand description
Limits for each allocation statistics parameter.
Fields§
§current: Threshold<usize>§peak: Threshold<usize>§total_size: Threshold<usize>§total_num: Threshold<usize>§reallocs: Threshold<usize>Implementations§
Source§impl AllocThresholds
impl AllocThresholds
pub fn check( &self, value: &MemoryStats, ref_value: &MemoryStats, ) -> Result<(), AllocThresholdsError>
Trait Implementations§
Source§impl Debug for AllocThresholds
impl Debug for AllocThresholds
Source§impl ThresholdFor<MemoryStats> for AllocThresholds
impl ThresholdFor<MemoryStats> for AllocThresholds
type Error = AllocThresholdsError
fn check_threshold( &self, value: &MemoryStats, ref_value: &MemoryStats, ) -> Result<(), Self::Error>
Auto Trait Implementations§
impl Freeze for AllocThresholds
impl RefUnwindSafe for AllocThresholds
impl Send for AllocThresholds
impl Sync for AllocThresholds
impl Unpin for AllocThresholds
impl UnwindSafe for AllocThresholds
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