#[non_exhaustive]pub struct RankContext<'a> {
pub car: EntityId,
pub car_position: f64,
pub stop: EntityId,
pub stop_position: f64,
pub group: &'a ElevatorGroup,
pub manifest: &'a DispatchManifest,
pub world: &'a World,
}Expand description
Context passed to DispatchStrategy::rank.
Bundles the per-call arguments into a single struct so future context fields can be added without breaking existing trait implementations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.car: EntityIdThe elevator being evaluated.
car_position: f64Current position of the car along the shaft axis.
stop: EntityIdThe stop being evaluated as a candidate destination.
stop_position: f64Position of the candidate stop along the shaft axis.
group: &'a ElevatorGroupThe dispatch group this assignment belongs to.
manifest: &'a DispatchManifestDemand snapshot for the current dispatch pass.
world: &'a WorldRead-only world state.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RankContext<'a>
impl<'a> !RefUnwindSafe for RankContext<'a>
impl<'a> Send for RankContext<'a>
impl<'a> Sync for RankContext<'a>
impl<'a> Unpin for RankContext<'a>
impl<'a> UnsafeUnpin for RankContext<'a>
impl<'a> !UnwindSafe for RankContext<'a>
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