pub struct Memory<B: Bmc> { /* private fields */ }Expand description
Represents a memory module (DIMM) in a computer system.
Provides access to memory module information and associated metrics/sensors.
Implementations§
Source§impl<B: Bmc> Memory<B>
impl<B: Bmc> Memory<B>
Sourcepub fn raw(&self) -> Arc<MemorySchema> ⓘ
pub fn raw(&self) -> Arc<MemorySchema> ⓘ
Get the raw schema data for this memory module.
Returns an Arc to the underlying schema, allowing cheap cloning
and sharing of the data.
Sourcepub async fn metrics(&self) -> Result<Option<Arc<MemoryMetrics>>, Error<B>>
pub async fn metrics(&self) -> Result<Option<Arc<MemoryMetrics>>, Error<B>>
Get memory metrics.
Returns the memory module’s performance and state metrics if available.
§Errors
Returns an error if:
- The memory module 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 memory.
Returns a vector of Sensor<B> obtained from environment metrics, if available. /// # Errors
§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 memory device.
Returns Ok(None) when environment metrics or PowerLimitWatts is absent.
§Errors
Returns an error if fetching environment metrics or the control fails.