Skip to main content

MemoryOptimizer

Trait MemoryOptimizer 

Source
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§

Source

fn get_memory_status(&self) -> Result<MemoryStatus, String>

Get current memory status

Source

fn optimize(&self, aggressive: bool) -> Result<OptimizationResult, String>

Run memory optimization

Source

fn has_elevated_privileges(&self) -> bool

Check if running with elevated privileges

Source

fn platform_name(&self) -> &'static str

Get platform name

Implementors§

Source§

impl MemoryOptimizer for StubOptimizer

Available on neither Windows nor macOS.