pub struct ForcedRecalibrationValue(/* private fields */);
Expand description
A runtime checked representation of the forced recalibration value. Accepted value range: [400…2000] ppm.
Implementations§
Source§impl ForcedRecalibrationValue
impl ForcedRecalibrationValue
Sourcepub const fn to_be_bytes(&self) -> [u8; 2]
pub const fn to_be_bytes(&self) -> [u8; 2]
Returns a big endian byte representation of the forced recalibration value.
Trait Implementations§
Source§impl Debug for ForcedRecalibrationValue
impl Debug for ForcedRecalibrationValue
Source§impl PartialEq for ForcedRecalibrationValue
impl PartialEq for ForcedRecalibrationValue
Source§impl TryFrom<&[u8]> for ForcedRecalibrationValue
impl TryFrom<&[u8]> for ForcedRecalibrationValue
Source§fn try_from(data: &[u8]) -> Result<Self, Self::Error>
fn try_from(data: &[u8]) -> Result<Self, Self::Error>
Converts buffered data to a ForcedRecalibrationValue value.
§Errors
- ReceivedBufferWrongSize if the
data
buffer is not big enough for the data that should have been received. - CrcFailed if the CRC of the received data does not match.
Source§impl TryFrom<u16> for ForcedRecalibrationValue
impl TryFrom<u16> for ForcedRecalibrationValue
Source§fn try_from(frc: u16) -> Result<Self, Self::Error>
fn try_from(frc: u16) -> Result<Self, Self::Error>
Converts a u16 value to a ForcedRecalibrationValue. The value must be between 2 and 1800 in s.
§Errors
- ValueOutOfRange if
frc
is lower than 400 or higher than 2000 ppm.
impl StructuralPartialEq for ForcedRecalibrationValue
Auto Trait Implementations§
impl Freeze for ForcedRecalibrationValue
impl RefUnwindSafe for ForcedRecalibrationValue
impl Send for ForcedRecalibrationValue
impl Sync for ForcedRecalibrationValue
impl Unpin for ForcedRecalibrationValue
impl UnwindSafe for ForcedRecalibrationValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more