Struct ev3dev_lang_rust::PowerSupply [−][src]
An interface to read data from the system’s power_supply class. Uses the built-in legoev3-battery if none is specified.
Implementations
impl PowerSupply
[src]
pub fn new() -> Ev3Result<PowerSupply>
[src]
Create a new instance of PowerSupply
.
pub fn get_current_now(&self) -> Ev3Result<i32>
[src]
Returns the battery current in microamps
pub fn get_scope(&self) -> Ev3Result<String>
[src]
Always returns System.
pub fn get_technology(&self) -> Ev3Result<String>
[src]
Returns Unknown or Li-ion depending on if the rechargeable battery is present.
pub fn get_type(&self) -> Ev3Result<String>
[src]
Always returns Battery.
pub fn get_voltage_max_design(&self) -> Ev3Result<i32>
[src]
Returns the nominal “full” battery voltage. The value returned depends on technology.
pub fn get_voltage_min_design(&self) -> Ev3Result<i32>
[src]
Returns the nominal “empty” battery voltage. The value returned depends on technology.
pub fn get_voltage_now(&self) -> Ev3Result<i32>
[src]
Returns the battery voltage in microvolts.
Trait Implementations
impl Clone for PowerSupply
[src]
fn clone(&self) -> PowerSupply
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PowerSupply
[src]
impl Device for PowerSupply
[src]
fn get_attribute(&self, name: &str) -> Attribute
[src]
fn get_address(&self) -> Ev3Result<String>
[src]
fn set_command(&self, command: &str) -> Ev3Result<()>
[src]
fn get_commands(&self) -> Ev3Result<Vec<String>>
[src]
fn get_driver_name(&self) -> Ev3Result<String>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PowerSupply
[src]
impl Send for PowerSupply
[src]
impl !Sync for PowerSupply
[src]
impl Unpin for PowerSupply
[src]
impl UnwindSafe for PowerSupply
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,