pub struct Battery(pub u32);
Tuple Fields§
§0: u32
Implementations§
source§impl Battery
impl Battery
sourcepub fn raw_max_voltage(&self) -> u16
pub fn raw_max_voltage(&self) -> u16
Maximum Voltage in 50mV units
sourcepub fn with_raw_max_voltage(self, value: u16) -> Self
pub fn with_raw_max_voltage(self, value: u16) -> Self
Maximum Voltage in 50mV units
sourcepub fn set_raw_max_voltage(&mut self, value: u16)
pub fn set_raw_max_voltage(&mut self, value: u16)
Maximum Voltage in 50mV units
sourcepub fn raw_min_voltage(&self) -> u16
pub fn raw_min_voltage(&self) -> u16
Minimum Voltage in 50mV units
sourcepub fn with_raw_min_voltage(self, value: u16) -> Self
pub fn with_raw_min_voltage(self, value: u16) -> Self
Minimum Voltage in 50mV units
sourcepub fn set_raw_min_voltage(&mut self, value: u16)
pub fn set_raw_min_voltage(&mut self, value: u16)
Minimum Voltage in 50mV units
sourcepub fn raw_max_power(&self) -> u16
pub fn raw_max_power(&self) -> u16
Maximum Allowable Power in 250mW units
sourcepub fn with_raw_max_power(self, value: u16) -> Self
pub fn with_raw_max_power(self, value: u16) -> Self
Maximum Allowable Power in 250mW units
sourcepub fn set_raw_max_power(&mut self, value: u16)
pub fn set_raw_max_power(&mut self, value: u16)
Maximum Allowable Power in 250mW units
source§impl Battery
impl Battery
pub fn max_voltage(&self) -> ElectricPotential
pub fn min_voltage(&self) -> ElectricPotential
pub fn max_power(&self) -> Power
Trait Implementations§
source§impl PartialEq for Battery
impl PartialEq for Battery
impl Copy for Battery
impl Eq for Battery
impl StructuralPartialEq for Battery
Auto Trait Implementations§
impl Freeze for Battery
impl RefUnwindSafe for Battery
impl Send for Battery
impl Sync for Battery
impl Unpin for Battery
impl UnwindSafe for Battery
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
source§impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls U::into(other)
.
That is, this conversion is whatever the implementation of Into
<T> for U
chooses to
do.
source§impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
source§unsafe fn unsafe_into(self) -> U
unsafe fn unsafe_into(self) -> U
Calls U::unsafe_from(self)
.
That is, this conversion is whatever the implementation of UnsafeFrom
<T> for U
chooses to do.