pub struct TemperatureInventory<S: Copy> { /* private fields */ }Expand description
Owns labels and ordered source identifiers for one physical boot. Session resets must retain this object. Sources identify driver instances, while labels are opaque display text and may repeat.
Implementations§
Source§impl<S: Copy> TemperatureInventory<S>
impl<S: Copy> TemperatureInventory<S>
pub const fn new() -> Self
Sourcepub fn register(&mut self, source: S, name: &str) -> Result<usize, Status>
pub fn register(&mut self, source: S, name: &str) -> Result<usize, Status>
Register atomically. Existing entries can never be changed or removed.
Sourcepub fn snapshot(&self) -> Vec<S, MAX_TEMPERATURE_SENSORS>
pub fn snapshot(&self) -> Vec<S, MAX_TEMPERATURE_SENSORS>
Capture before acquisition. Registrations made afterward belong to the next sample, even when individual sensor reads yield to other tasks.
Sourcepub fn read_names(&self, out: &mut [u8]) -> Result<usize, Status>
pub fn read_names(&self, out: &mut [u8]) -> Result<usize, Status>
Names are inventory data; this never accesses a sensor or driver.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for TemperatureInventory<S>where
S: Freeze,
impl<S> RefUnwindSafe for TemperatureInventory<S>where
S: RefUnwindSafe,
impl<S> Send for TemperatureInventory<S>where
S: Send,
impl<S> Sync for TemperatureInventory<S>where
S: Sync,
impl<S> Unpin for TemperatureInventory<S>where
S: Unpin,
impl<S> UnwindSafe for TemperatureInventory<S>where
S: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more