pub struct MemoryUsageBuilder<'a> { /* private fields */ }Expand description
Creates MemoryUsage from DBs and caches.
Most users should call get_memory_usage_stats instead.
Implementations§
Source§impl<'a> MemoryUsageBuilder<'a>
impl<'a> MemoryUsageBuilder<'a>
Sourcepub fn add_tx_db<T: ThreadMode>(&mut self, db: &'a TransactionDB<T>)
pub fn add_tx_db<T: ThreadMode>(&mut self, db: &'a TransactionDB<T>)
Add a DB instance to collect memory usage from it and add up in total stats
Sourcepub fn add_db<T: ThreadMode, D: DBInner>(&mut self, db: &'a DBCommon<T, D>)
pub fn add_db<T: ThreadMode, D: DBInner>(&mut self, db: &'a DBCommon<T, D>)
Add a DB instance to collect memory usage from it and add up in total stats
Sourcepub fn add_cache(&mut self, cache: &'a Cache)
pub fn add_cache(&mut self, cache: &'a Cache)
Add a cache to collect memory usage from it and add up in total stats
Sourcepub fn build(&self) -> Result<MemoryUsage, Error>
pub fn build(&self) -> Result<MemoryUsage, Error>
Build up MemoryUsage
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MemoryUsageBuilder<'a>
impl<'a> RefUnwindSafe for MemoryUsageBuilder<'a>
impl<'a> !Send for MemoryUsageBuilder<'a>
impl<'a> !Sync for MemoryUsageBuilder<'a>
impl<'a> Unpin for MemoryUsageBuilder<'a>
impl<'a> UnwindSafe for MemoryUsageBuilder<'a>
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