pub struct MemoryComponentAdapter { /* private fields */ }Expand description
Adapter that converts MemoryManager to PluginMemoryComponent
Implementations§
Source§impl MemoryComponentAdapter
impl MemoryComponentAdapter
pub fn new(component: Arc<MemoryManager>) -> Self
Trait Implementations§
Source§impl NerveComponent for MemoryComponentAdapter
impl NerveComponent for MemoryComponentAdapter
Source§fn id(&self) -> &ComponentId
fn id(&self) -> &ComponentId
Get component identifier
Source§fn component_type(&self) -> ComponentType
fn component_type(&self) -> ComponentType
Get component type
Source§fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Check if component is healthy
Source§fn get_statistics(&self) -> SystemStatistics
fn get_statistics(&self) -> SystemStatistics
Get component statistics
Source§fn reset_statistics(&mut self)
fn reset_statistics(&mut self)
Reset component statistics
Source§fn shutdown(&mut self) -> NerveResult<()>
fn shutdown(&mut self) -> NerveResult<()>
Shutdown the component
Source§impl PluginMemoryComponent for MemoryComponentAdapter
impl PluginMemoryComponent for MemoryComponentAdapter
Source§fn memory_usage(&self) -> u64
fn memory_usage(&self) -> u64
Get current memory usage in bytes
Source§fn memory_utilization(&self) -> f64
fn memory_utilization(&self) -> f64
Get memory utilization percentage
Source§fn is_memory_critical(&self) -> bool
fn is_memory_critical(&self) -> bool
Check if memory is critically low
Auto Trait Implementations§
impl Freeze for MemoryComponentAdapter
impl RefUnwindSafe for MemoryComponentAdapter
impl Send for MemoryComponentAdapter
impl Sync for MemoryComponentAdapter
impl Unpin for MemoryComponentAdapter
impl UnwindSafe for MemoryComponentAdapter
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