pub trait MemoryPoolManager: Send + Sync {
// Required methods
fn get_pool<'life0, 'async_trait>(
&'life0 self,
index: usize,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MemoryPool>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pool_for_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MemoryPool>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn all_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PoolStats>, DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rebalance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), DatabaseError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Manager for 7-wide memory pools
Required Methods§
Sourcefn get_pool<'life0, 'async_trait>(
&'life0 self,
index: usize,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MemoryPool>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pool<'life0, 'async_trait>(
&'life0 self,
index: usize,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MemoryPool>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a specific pool by index (0-6)
Sourcefn get_pool_for_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MemoryPool>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_pool_for_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MemoryPool>, DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get pool for a specific key (using consistent hashing)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".