#[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 moreSource§impl Debug for ServiceMode
impl Debug for ServiceMode
Source§impl Default for ServiceMode
impl Default for ServiceMode
Source§fn default() -> ServiceMode
fn default() -> ServiceMode
Source§impl<'de> Deserialize<'de> for ServiceMode
impl<'de> Deserialize<'de> for ServiceMode
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>,
Source§impl Display for ServiceMode
impl Display for ServiceMode
Source§impl Hash for ServiceMode
impl Hash for ServiceMode
Source§impl PartialEq for ServiceMode
impl PartialEq for ServiceMode
Source§impl Serialize for ServiceMode
impl Serialize for ServiceMode
impl Copy for ServiceMode
impl Eq for ServiceMode
impl StructuralPartialEq for ServiceMode
Auto Trait Implementations§
impl Freeze for ServiceMode
impl RefUnwindSafe for ServiceMode
impl Send for ServiceMode
impl Sync for ServiceMode
impl Unpin for ServiceMode
impl UnsafeUnpin for ServiceMode
impl UnwindSafe for ServiceMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.