pub struct MemoryOptimizer { /* private fields */ }Expand description
Memory usage tracking and optimization suggestions
Implementations§
Source§impl MemoryOptimizer
impl MemoryOptimizer
Sourcepub fn record_usage(&mut self, usagebytes: usize)
pub fn record_usage(&mut self, usagebytes: usize)
Record memory usage
Sourcepub fn get_suggestions(&self, devicememory: usize) -> Vec<String>
pub fn get_suggestions(&self, devicememory: usize) -> Vec<String>
Get optimization suggestions based on usage patterns
Sourcepub fn efficiency_score(&self, devicememory: usize) -> f64
pub fn efficiency_score(&self, devicememory: usize) -> f64
Calculate memory efficiency score (0-100)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryOptimizer
impl RefUnwindSafe for MemoryOptimizer
impl Send for MemoryOptimizer
impl Sync for MemoryOptimizer
impl Unpin for MemoryOptimizer
impl UnsafeUnpin for MemoryOptimizer
impl UnwindSafe for MemoryOptimizer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more