Struct ev3dev_lang_rust::PowerSupply [−][src]
pub struct PowerSupply { /* fields omitted */ }
Expand description
An interface to read data from the system’s power_supply class. Uses the built-in legoev3-battery if none is specified.
Implementations
Create a new instance of PowerSupply
.
Returns the battery current in microamps
Returns Unknown or Li-ion depending on if the rechargeable battery is present.
Returns the nominal “full” battery voltage. The value returned depends on technology.
Returns the nominal “empty” battery voltage. The value returned depends on technology.
Returns the battery voltage in microvolts.
Trait Implementations
Returns the attribute wrapper for an attribute name.
Returns the name of the port that the motor is connected to.
Sends a command to the device controller.
Returns a space separated list of commands that are supported by the device controller.
Returns the name of the driver that provides this device.
Auto Trait Implementations
impl !RefUnwindSafe for PowerSupply
impl Send for PowerSupply
impl !Sync for PowerSupply
impl Unpin for PowerSupply
impl UnwindSafe for PowerSupply
Blanket Implementations
Mutably borrows from an owned value. Read more