Trait oc2_hlapi::device::EnergyStorageInterface

source ·
pub trait EnergyStorageInterface: RpcDevice {
    // Required methods
    fn get_energy_stored(&self) -> Result<i32>
       where i32: DeserializeOwned + 'static;
    fn get_max_energy_stored(&self) -> Result<i32>
       where i32: DeserializeOwned + 'static;
    fn can_extract_energy(&self) -> Result<bool>
       where bool: DeserializeOwned + 'static;
    fn can_receive_energy(&self) -> Result<bool>
       where bool: DeserializeOwned + 'static;
}
Expand description

An interface between an energy storage device and the HLAPI.

Required Methods§

source

fn get_energy_stored(&self) -> Result<i32>
where i32: DeserializeOwned + 'static,

Retrieves the current amount of energy stored in FE.

source

fn get_max_energy_stored(&self) -> Result<i32>
where i32: DeserializeOwned + 'static,

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

source

fn can_extract_energy(&self) -> Result<bool>
where bool: DeserializeOwned + 'static,

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

source

fn can_receive_energy(&self) -> Result<bool>
where bool: DeserializeOwned + 'static,

Returns a boolean indicating whether the storage device can receive energy.

Object Safety§

This trait is not object safe.

Implementors§