Trait oc2_hlapi::device::EnergyStorageInterface
source · pub trait EnergyStorageInterface: RpcDevice {
// Required methods
fn get_energy_stored(&self) -> Result<i32>;
fn get_max_energy_stored(&self) -> Result<i32>;
fn can_extract_energy(&self) -> Result<bool>;
fn can_receive_energy(&self) -> Result<bool>;
}Expand description
An interface between an energy storage device and the HLAPI.
Required Methods§
sourcefn get_energy_stored(&self) -> Result<i32>
fn get_energy_stored(&self) -> Result<i32>
Retrieves the current amount of energy stored in FE.
sourcefn get_max_energy_stored(&self) -> Result<i32>
fn get_max_energy_stored(&self) -> Result<i32>
Retrieves the maximum possible energy that can be stored in the device in FE.
sourcefn can_extract_energy(&self) -> Result<bool>
fn can_extract_energy(&self) -> Result<bool>
Returns a boolean indicating whether the storage device can have energy extracted from it.
sourcefn can_receive_energy(&self) -> Result<bool>
fn can_receive_energy(&self) -> Result<bool>
Returns a boolean indicating whether the storage device can receive energy.
Object Safety§
This trait is not object safe.