pub struct LoopSweepDispatch;Expand description
Dispatch strategy for LineKind::Loop groups.
See the module-level documentation for the full contract. The struct
holds no per-pass state — Loop cars patrol forward on their own and
never enter the Hungarian assignment — so it is a unit struct. The
Serialize/Deserialize derives keep it round-trip-compatible with
the snapshot identity layer for symmetry with the other built-ins.
Implementations§
Trait Implementations§
Source§impl Clone for LoopSweepDispatch
impl Clone for LoopSweepDispatch
Source§fn clone(&self) -> LoopSweepDispatch
fn clone(&self) -> LoopSweepDispatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoopSweepDispatch
impl Debug for LoopSweepDispatch
Source§impl Default for LoopSweepDispatch
impl Default for LoopSweepDispatch
Source§fn default() -> LoopSweepDispatch
fn default() -> LoopSweepDispatch
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LoopSweepDispatch
impl<'de> Deserialize<'de> for LoopSweepDispatch
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
Source§impl DispatchStrategy for LoopSweepDispatch
impl DispatchStrategy for LoopSweepDispatch
Source§fn builtin_id(&self) -> Option<BuiltinStrategy>
fn builtin_id(&self) -> Option<BuiltinStrategy>
If this strategy is a known built-in variant, return it so
Simulation::new can stamp the
correct BuiltinStrategy into the group’s snapshot identity. Read moreSource§fn pre_dispatch(
&mut self,
_group: &ElevatorGroup,
_manifest: &DispatchManifest,
_world: &mut World,
)
fn pre_dispatch( &mut self, _group: &ElevatorGroup, _manifest: &DispatchManifest, _world: &mut World, )
Optional hook called once per group before the assignment pass. Read more
Source§fn prepare_car(
&mut self,
_car: EntityId,
_car_position: f64,
_group: &ElevatorGroup,
_manifest: &DispatchManifest,
_world: &World,
)
fn prepare_car( &mut self, _car: EntityId, _car_position: f64, _group: &ElevatorGroup, _manifest: &DispatchManifest, _world: &World, )
Source§fn fallback(
&mut self,
_car: EntityId,
_car_position: f64,
_group: &ElevatorGroup,
_manifest: &DispatchManifest,
_world: &World,
) -> DispatchDecision
fn fallback( &mut self, _car: EntityId, _car_position: f64, _group: &ElevatorGroup, _manifest: &DispatchManifest, _world: &World, ) -> DispatchDecision
Decide what an idle car should do when no stop was assigned to it. Read more
Source§fn notify_removed(&mut self, _elevator: EntityId)
fn notify_removed(&mut self, _elevator: EntityId)
Notify the strategy that an elevator has been removed. Read more
Source§fn snapshot_config(&self) -> Option<String>
fn snapshot_config(&self) -> Option<String>
Serialize this strategy’s tunable configuration to a string
that
restore_config can apply to a
freshly-instantiated instance. Read moreSource§fn restore_config(&mut self, _serialized: &str) -> Result<(), String>
fn restore_config(&mut self, _serialized: &str) -> Result<(), String>
Restore tunable configuration from a string previously produced
by
snapshot_config on the same
strategy variant. Called by
crate::snapshot::WorldSnapshot::restore immediately after
BuiltinStrategy::instantiate builds the default instance,
so the restore writes over the defaults. Read moreSource§impl Serialize for LoopSweepDispatch
impl Serialize for LoopSweepDispatch
impl Copy for LoopSweepDispatch
Auto Trait Implementations§
impl Freeze for LoopSweepDispatch
impl RefUnwindSafe for LoopSweepDispatch
impl Send for LoopSweepDispatch
impl Sync for LoopSweepDispatch
impl Unpin for LoopSweepDispatch
impl UnsafeUnpin for LoopSweepDispatch
impl UnwindSafe for LoopSweepDispatch
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