pub struct ResourceMonitor { /* private fields */ }Expand description
Resource monitor for real-time resource tracking and alerting
Implementations§
Source§impl ResourceMonitor
impl ResourceMonitor
Sourcepub fn get_metrics(&self) -> &ResourceMetrics
pub fn get_metrics(&self) -> &ResourceMetrics
Get current resource metrics
Sourcepub fn subscribe(
&mut self,
subscription: MonitorSubscription,
) -> SklResult<String>
pub fn subscribe( &mut self, subscription: MonitorSubscription, ) -> SklResult<String>
Subscribe to metrics updates
Sourcepub fn unsubscribe(&mut self, subscription_id: &str) -> SklResult<()>
pub fn unsubscribe(&mut self, subscription_id: &str) -> SklResult<()>
Unsubscribe from metrics updates
Trait Implementations§
Source§impl Debug for ResourceMonitor
impl Debug for ResourceMonitor
Auto Trait Implementations§
impl Freeze for ResourceMonitor
impl !RefUnwindSafe for ResourceMonitor
impl Send for ResourceMonitor
impl Sync for ResourceMonitor
impl Unpin for ResourceMonitor
impl !UnwindSafe for ResourceMonitor
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
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