pub struct Processor<B: Bmc> { /* private fields */ }Expand description
Represents a processor in a computer system.
Provides access to processor information and associated metrics/sensors.
Implementations§
Source§impl<B: Bmc> Processor<B>
impl<B: Bmc> Processor<B>
Sourcepub fn raw(&self) -> Arc<ProcessorSchema> ⓘ
pub fn raw(&self) -> Arc<ProcessorSchema> ⓘ
Get the raw schema data for this processor.
Returns an Arc to the underlying schema, allowing cheap cloning
and sharing of the data.
Sourcepub async fn metrics(&self) -> Result<Option<Arc<ProcessorMetrics>>, Error<B>>
pub async fn metrics(&self) -> Result<Option<Arc<ProcessorMetrics>>, Error<B>>
Get processor metrics.
Returns the processor’s performance and state metrics if available.
§Errors
Returns an error if:
- The processor does not have metrics
- Fetching metrics data fails
Sourcepub async fn environment_sensor_links(
&self,
) -> Result<Vec<SensorLink<B>>, Error<B>>
pub async fn environment_sensor_links( &self, ) -> Result<Vec<SensorLink<B>>, Error<B>>
Get the environment sensors for this processor.
Returns a vector of Sensor<B> obtained from environment metrics, if available.
§Errors
Returns an error if get of environment metrics failed.
Sourcepub async fn environment_power_limit_control(
&self,
) -> Result<Option<Control<B>>, Error<B>>
pub async fn environment_power_limit_control( &self, ) -> Result<Option<Control<B>>, Error<B>>
Get the environment power limit control for this processor.
Returns Ok(None) when environment metrics or PowerLimitWatts is absent.
§Errors
Returns an error if fetching environment metrics or the control fails.
Sourcepub async fn metrics_sensor_links(&self) -> Result<Vec<SensorLink<B>>, Error<B>>
pub async fn metrics_sensor_links(&self) -> Result<Vec<SensorLink<B>>, Error<B>>
Get the metrics sensors for this processor.
Returns a vector of Sensor<B> obtained from metrics metrics, if available.
§Errors
Returns an error if get of metrics failed.