pub struct HeapStats {
pub total_entries: usize,
pub object_count: usize,
pub array_count: usize,
pub function_count: usize,
pub string_count: usize,
pub memory_usage: usize,
pub fragmentation: f64,
}Fields§
§total_entries: usize§object_count: usize§array_count: usize§function_count: usize§string_count: usize§memory_usage: usize§fragmentation: f64Implementations§
Source§impl HeapStats
impl HeapStats
pub fn new() -> Self
pub fn update_counts( &mut self, object_count: usize, array_count: usize, function_count: usize, string_count: usize, )
pub fn set_memory_usage(&mut self, usage: usize)
pub fn set_fragmentation(&mut self, fragmentation: f64)
pub fn get_efficiency(&self) -> f64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HeapStats
impl<'de> Deserialize<'de> for HeapStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for HeapStats
impl StructuralPartialEq for HeapStats
Auto Trait Implementations§
impl Freeze for HeapStats
impl RefUnwindSafe for HeapStats
impl Send for HeapStats
impl Sync for HeapStats
impl Unpin for HeapStats
impl UnwindSafe for HeapStats
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