pub trait NodeStateExt {
Show 17 methods
// Required methods
fn new(position: (f64, f64, f64)) -> Self;
fn update_timestamp(&mut self);
fn get_position(&self) -> (f64, f64, f64);
fn update_position(&mut self, position: (f64, f64, f64));
fn get_health(&self) -> HealthStatus;
fn update_health(&mut self, health: HealthStatus);
fn get_phase(&self) -> Phase;
fn update_phase(&mut self, phase: Phase);
fn assign_cell(&mut self, cell_id: String);
fn leave_cell(&mut self);
fn assign_zone(&mut self, zone_id: String);
fn leave_zone(&mut self);
fn consume_fuel(&mut self, minutes: u32);
fn replenish_fuel(&mut self, minutes: u32);
fn is_operational(&self) -> bool;
fn needs_refuel(&self) -> bool;
fn merge(&mut self, other: &NodeState);
}Required Methods§
Sourcefn update_timestamp(&mut self)
fn update_timestamp(&mut self)
Update the timestamp to current time
Sourcefn get_position(&self) -> (f64, f64, f64)
fn get_position(&self) -> (f64, f64, f64)
Get position as tuple (lat, lon, alt)
Sourcefn update_position(&mut self, position: (f64, f64, f64))
fn update_position(&mut self, position: (f64, f64, f64))
Update position (LWW-Register operation)
Sourcefn get_health(&self) -> HealthStatus
fn get_health(&self) -> HealthStatus
Get health status
Sourcefn update_health(&mut self, health: HealthStatus)
fn update_health(&mut self, health: HealthStatus)
Update health status (LWW-Register operation)
Sourcefn update_phase(&mut self, phase: Phase)
fn update_phase(&mut self, phase: Phase)
Update phase (LWW-Register operation)
Sourcefn assign_cell(&mut self, cell_id: String)
fn assign_cell(&mut self, cell_id: String)
Assign to a cell (LWW-Register operation)
Sourcefn leave_cell(&mut self)
fn leave_cell(&mut self)
Remove from cell (LWW-Register operation)
Sourcefn assign_zone(&mut self, zone_id: String)
fn assign_zone(&mut self, zone_id: String)
Assign to a zone (LWW-Register operation)
Sourcefn leave_zone(&mut self)
fn leave_zone(&mut self)
Remove from zone (LWW-Register operation)
Sourcefn consume_fuel(&mut self, minutes: u32)
fn consume_fuel(&mut self, minutes: u32)
Consume fuel (PN-Counter decrement operation)
Sourcefn replenish_fuel(&mut self, minutes: u32)
fn replenish_fuel(&mut self, minutes: u32)
Replenish fuel (PN-Counter increment operation)
Sourcefn is_operational(&self) -> bool
fn is_operational(&self) -> bool
Check if platform is operational
Sourcefn needs_refuel(&self) -> bool
fn needs_refuel(&self) -> bool
Check if platform needs refueling (below 25% capacity)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.