pub struct ByProperty<F> { /* private fields */ }Expand description
Property-sorted scheduler - activates agents sorted by a user-defined key.
The selector closure extracts an Ord-comparable key from each agent.
Agents with the greatest key value are activated first (descending order).
When multiple agents produce the same key, reproducibility falls back to the relative order already present in the collected ID buffer.
§Example
ⓘ
// Activate highest-energy agents first
let sched = ByProperty::new(|a: &MyAgent| a.energy);Implementations§
Source§impl<F> ByProperty<F>
impl<F> ByProperty<F>
Trait Implementations§
Source§impl<F: Debug> Debug for ByProperty<F>
impl<F: Debug> Debug for ByProperty<F>
Auto Trait Implementations§
impl<F> Freeze for ByProperty<F>where
F: Freeze,
impl<F> RefUnwindSafe for ByProperty<F>where
F: RefUnwindSafe,
impl<F> Send for ByProperty<F>where
F: Send,
impl<F> Sync for ByProperty<F>where
F: Sync,
impl<F> Unpin for ByProperty<F>where
F: Unpin,
impl<F> UnsafeUnpin for ByProperty<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for ByProperty<F>where
F: UnwindSafe,
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