pub struct SMeterReading(/* private fields */);Expand description
S-meter reading (0-5).
The radio returns 0-5 via the SM command, mapping to signal strengths
S0, S1, S3, S5, S7, S9 respectively.
Implementations§
Source§impl SMeterReading
impl SMeterReading
Sourcepub const fn new(value: u8) -> Result<Self, ValidationError>
pub const fn new(value: u8) -> Result<Self, ValidationError>
Creates a new SMeterReading from a raw value.
§Errors
Returns ValidationError::SettingOutOfRange if value > 5.
Trait Implementations§
Source§impl Clone for SMeterReading
impl Clone for SMeterReading
Source§fn clone(&self) -> SMeterReading
fn clone(&self) -> SMeterReading
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SMeterReading
impl Debug for SMeterReading
Source§impl Display for SMeterReading
impl Display for SMeterReading
Source§impl From<SMeterReading> for u8
impl From<SMeterReading> for u8
Source§fn from(reading: SMeterReading) -> Self
fn from(reading: SMeterReading) -> Self
Converts to this type from the input type.
Source§impl Hash for SMeterReading
impl Hash for SMeterReading
Source§impl PartialEq for SMeterReading
impl PartialEq for SMeterReading
Source§impl TryFrom<u8> for SMeterReading
impl TryFrom<u8> for SMeterReading
impl Copy for SMeterReading
impl Eq for SMeterReading
impl StructuralPartialEq for SMeterReading
Auto Trait Implementations§
impl Freeze for SMeterReading
impl RefUnwindSafe for SMeterReading
impl Send for SMeterReading
impl Sync for SMeterReading
impl Unpin for SMeterReading
impl UnwindSafe for SMeterReading
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