pub trait ResourceMonitor:
Send
+ Sync
+ 'static {
// Required method
fn snapshot(
&self,
) -> Pin<Box<dyn Future<Output = Result<ResourceUsage, SdkError>> + Send + '_>>;
// Provided method
fn is_over_budget(
&self,
) -> Pin<Box<dyn Future<Output = Result<bool, SdkError>> + Send + '_>> { ... }
}Expand description
Reports current resource usage and whether the budget is exceeded.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".