pub struct StopCalls {
pub up: Option<HallCall>,
pub down: Option<HallCall>,
}Expand description
The up/down hall call pair at a single stop.
At most two calls coexist at a stop (one per CallDirection);
this struct owns the slots. Stored in World::hall_calls keyed by
the stop’s entity id.
Fields§
§up: Option<HallCall>Pending upward call, if the up button is pressed.
down: Option<HallCall>Pending downward call, if the down button is pressed.
Implementations§
Source§impl StopCalls
impl StopCalls
Sourcepub const fn get(&self, direction: CallDirection) -> Option<&HallCall>
pub const fn get(&self, direction: CallDirection) -> Option<&HallCall>
Borrow the call for a specific direction.
Sourcepub const fn get_mut(
&mut self,
direction: CallDirection,
) -> Option<&mut HallCall>
pub const fn get_mut( &mut self, direction: CallDirection, ) -> Option<&mut HallCall>
Mutable borrow of the call for a direction.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StopCalls
impl<'de> Deserialize<'de> for StopCalls
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 StopCalls
impl RefUnwindSafe for StopCalls
impl Send for StopCalls
impl Sync for StopCalls
impl Unpin for StopCalls
impl UnsafeUnpin for StopCalls
impl UnwindSafe for StopCalls
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