#[non_exhaustive]pub enum Direction {
Up,
Down,
Either,
Forward,
}Expand description
Direction an elevator’s indicator lamps are signalling.
On a LineKind::Linear shaft this
is derived from the pair of going_up / going_down flags on
Elevator. Either corresponds to both lamps lit — the car is idle
and will accept riders heading either way; Up / Down correspond to
an actively committed direction.
On a LineKind::Loop the
Up/Down/Either distinction is meaningless (every car serves every
stop forward through the loop), so Loop cars report
Direction::Forward instead. HUD/metrics consumers should
pattern-match exhaustively on the enum (it is #[non_exhaustive]).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Up
Car will serve upward trips only.
Down
Car will serve downward trips only.
Either
Car will serve either direction (idle).
Forward
Car is travelling forward around a one-way loop. Loop topologies
have no “up”/“down” axis, so neither lamp is meaningful — this
variant is the honest replacement for Either on Loop cars.
Linear cars never report this variant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Direction
impl<'de> Deserialize<'de> for Direction
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>,
impl Copy for Direction
impl Eq for Direction
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnsafeUnpin for Direction
impl UnwindSafe for Direction
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.