#[non_exhaustive]pub enum ServiceMode {
Normal,
Independent,
Inspection,
Manual,
}Expand description
Operational service mode for an elevator, orthogonal to ElevatorPhase.
Normal is the default. Modes modify how simulation phases behave without
replacing ElevatorPhase — an elevator in any service mode may occupy
any phase (Idle, MovingToStop, Repositioning, etc.). Independent
elevators are excluded from automatic dispatch and repositioning, so in
practice they only move under direct API control.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Normal
Normal operation: dispatch assigns stops, doors auto-cycle.
Independent
Independent mode: elevator is excluded from dispatch and repositioning. Consumer controls movement via direct API calls.
Inspection
Inspection mode: reduced speed, doors hold open indefinitely.
Speed is reduced by Elevator::inspection_speed_factor.
Manual
Manual mode: elevator is driven by direct velocity commands from the
game (see
Simulation::set_target_velocity
and Simulation::emergency_stop).
Excluded from dispatch and repositioning; doors follow the manual
door-control API. Can stop at any position — the elevator is not
required to align with a configured stop.
Implementations§
Source§impl ServiceMode
impl ServiceMode
Sourcepub const fn is_dispatch_excluded(self) -> bool
pub const fn is_dispatch_excluded(self) -> bool
true if elevators in this mode are skipped by the automatic
dispatch and repositioning phases.
Returns true for Independent and
Manual, which both hand elevator movement over
to the consumer.
Trait Implementations§
Source§impl Clone for ServiceMode
impl Clone for ServiceMode
Source§fn clone(&self) -> ServiceMode
fn clone(&self) -> ServiceMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more