pub struct EnergyMetrics { /* private fields */ }Expand description
Accumulated energy metrics for a single elevator.
Implementations§
Source§impl EnergyMetrics
impl EnergyMetrics
Sourcepub const fn total_consumed(&self) -> f64
pub const fn total_consumed(&self) -> f64
Total energy consumed.
Sourcepub const fn total_regenerated(&self) -> f64
pub const fn total_regenerated(&self) -> f64
Total energy regenerated.
Sourcepub const fn ticks_tracked(&self) -> u32
pub const fn ticks_tracked(&self) -> u32
Number of ticks with energy activity recorded.
Sourcepub const fn net_energy(&self) -> f64
pub const fn net_energy(&self) -> f64
Net energy: consumed minus regenerated.
Trait Implementations§
Source§impl Clone for EnergyMetrics
impl Clone for EnergyMetrics
Source§fn clone(&self) -> EnergyMetrics
fn clone(&self) -> EnergyMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnergyMetrics
impl Debug for EnergyMetrics
Source§impl Default for EnergyMetrics
impl Default for EnergyMetrics
Source§fn default() -> EnergyMetrics
fn default() -> EnergyMetrics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnergyMetrics
impl<'de> Deserialize<'de> for EnergyMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EnergyMetrics
impl RefUnwindSafe for EnergyMetrics
impl Send for EnergyMetrics
impl Sync for EnergyMetrics
impl Unpin for EnergyMetrics
impl UnsafeUnpin for EnergyMetrics
impl UnwindSafe for EnergyMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more