pub(crate) struct Sensors<R> {
inventory: TemperatureInventory<Source>,
reader: R,
}Fields§
§inventory: TemperatureInventory<Source>§reader: RImplementations§
Source§impl<R: Reader> Sensors<R>
impl<R: Reader> Sensors<R>
pub(crate) fn new(reader: R) -> Self
Sourcepub(crate) fn with_board_sensors(reader: R) -> Self
pub(crate) fn with_board_sensors(reader: R) -> Self
Add the board’s fixed inventory once at boot, after the MCU slot.
Sourcepub(crate) fn register(
&mut self,
source: Source,
name: &str,
) -> Result<usize, Status>
pub(crate) fn register( &mut self, source: Source, name: &str, ) -> Result<usize, Status>
Future discovery registers through this owner, retaining existing slots when a driver becomes unavailable. Never rebuild on a protocol reset.
pub(crate) fn read_names(&self, out: &mut [u8]) -> Result<usize, Status>
pub(crate) async fn sample(&mut self, out: &mut [u16]) -> Result<usize, Status>
Auto Trait Implementations§
impl<R> Freeze for Sensors<R>where
R: Freeze,
impl<R> RefUnwindSafe for Sensors<R>where
R: RefUnwindSafe,
impl<R> Send for Sensors<R>where
R: Send,
impl<R> Sync for Sensors<R>where
R: Sync,
impl<R> Unpin for Sensors<R>where
R: Unpin,
impl<R> UnwindSafe for Sensors<R>where
R: 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