pub struct Battery(pub u32);Tuple Fields§
§0: u32Implementations§
Source§impl Battery
impl Battery
Sourcepub fn max_voltage(&self) -> u16
pub fn max_voltage(&self) -> u16
Maximum Voltage in 50mV units
Sourcepub fn with_max_voltage(self, value: u16) -> Self
pub fn with_max_voltage(self, value: u16) -> Self
Maximum Voltage in 50mV units
Sourcepub fn set_max_voltage(&mut self, value: u16)
pub fn set_max_voltage(&mut self, value: u16)
Maximum Voltage in 50mV units
Sourcepub fn min_voltage(&self) -> u16
pub fn min_voltage(&self) -> u16
Minimum Voltage in 50mV units
Sourcepub fn with_min_voltage(self, value: u16) -> Self
pub fn with_min_voltage(self, value: u16) -> Self
Minimum Voltage in 50mV units
Sourcepub fn set_min_voltage(&mut self, value: u16)
pub fn set_min_voltage(&mut self, value: u16)
Minimum Voltage in 50mV units
Sourcepub fn with_max_power(self, value: u16) -> Self
pub fn with_max_power(self, value: u16) -> Self
Maximum Allowable Power in 250mW units
Sourcepub fn set_max_power(&mut self, value: u16)
pub fn set_max_power(&mut self, value: u16)
Maximum Allowable Power in 250mW units
Trait Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> UnsafeFrom<U> for Twhere
T: From<U>,
impl<T, U> UnsafeFrom<U> for Twhere
T: From<U>,
Source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls T::from(other).
That is, this conversion is whatever the implementation of From<U> for T 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.