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§

source

fn get_energy_stored(&self) -> Result<i32>

Retrieves the current amount of energy stored in FE.

source

fn get_max_energy_stored(&self) -> Result<i32>

Retrieves the maximum possible energy that can be stored in the device in FE.

source

fn can_extract_energy(&self) -> Result<bool>

Returns a boolean indicating whether the storage device can have energy extracted from it.

source

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.

Implementors§