pub trait MemoryOptimizer: Send + Sync {
// Required methods
fn get_memory_status(&self) -> Result<MemoryStatus, String>;
fn optimize(&self, aggressive: bool) -> Result<OptimizationResult, String>;
fn has_elevated_privileges(&self) -> bool;
fn platform_name(&self) -> &'static str;
}Expand description
Platform-agnostic memory optimizer trait
Required Methods§
Sourcefn get_memory_status(&self) -> Result<MemoryStatus, String>
fn get_memory_status(&self) -> Result<MemoryStatus, String>
Get current memory status
Sourcefn optimize(&self, aggressive: bool) -> Result<OptimizationResult, String>
fn optimize(&self, aggressive: bool) -> Result<OptimizationResult, String>
Run memory optimization
Sourcefn has_elevated_privileges(&self) -> bool
fn has_elevated_privileges(&self) -> bool
Check if running with elevated privileges
Sourcefn platform_name(&self) -> &'static str
fn platform_name(&self) -> &'static str
Get platform name
Implementors§
impl MemoryOptimizer for StubOptimizer
Available on neither Windows nor macOS.