pub struct StationScheduler {
pub advanced_ticks: u64,
}Expand description
Basic in-process station scheduler.
Fields§
§advanced_ticks: u64Total station ticks advanced by this scheduler.
Implementations§
Source§impl StationScheduler
impl StationScheduler
Sourcepub fn advance_all(&mut self, stations: &mut StationSet)
pub fn advance_all(&mut self, stations: &mut StationSet)
Advances every station by one tick.
Sourcepub fn plan_loaded(
&self,
stations: &StationSet,
samples: &[StationLoadSample],
config: StationScheduleConfig,
) -> StationSchedulePlan
pub fn plan_loaded( &self, stations: &StationSet, samples: &[StationLoadSample], config: StationScheduleConfig, ) -> StationSchedulePlan
Plans a bounded station advancement pass from load samples.
Sourcepub fn plan_loaded_into<'a>(
&self,
stations: &StationSet,
samples: &[StationLoadSample],
config: StationScheduleConfig,
scratch: &'a mut StationScheduleScratch,
) -> StationScheduleView<'a>
pub fn plan_loaded_into<'a>( &self, stations: &StationSet, samples: &[StationLoadSample], config: StationScheduleConfig, scratch: &'a mut StationScheduleScratch, ) -> StationScheduleView<'a>
Plans into caller-owned storage and returns a borrowed deterministic top-k view.
Sourcepub fn advance_loaded(
&mut self,
stations: &mut StationSet,
samples: &[StationLoadSample],
config: StationScheduleConfig,
) -> StationSchedulePlan
pub fn advance_loaded( &mut self, stations: &mut StationSet, samples: &[StationLoadSample], config: StationScheduleConfig, ) -> StationSchedulePlan
Advances a bounded set of high-load stations by one tick each.
Sourcepub fn advance_loaded_into<'a>(
&mut self,
stations: &mut StationSet,
samples: &[StationLoadSample],
config: StationScheduleConfig,
scratch: &'a mut StationScheduleScratch,
) -> StationScheduleView<'a>
pub fn advance_loaded_into<'a>( &mut self, stations: &mut StationSet, samples: &[StationLoadSample], config: StationScheduleConfig, scratch: &'a mut StationScheduleScratch, ) -> StationScheduleView<'a>
Advances a bounded top-k set using reusable caller-owned scheduling storage.
Sourcepub fn drain_ready_events(
&mut self,
stations: &StationSet,
router: &mut EventRouter,
) -> Result<Vec<StationEvent>, EventRouterError>
pub fn drain_ready_events( &mut self, stations: &StationSet, router: &mut EventRouter, ) -> Result<Vec<StationEvent>, EventRouterError>
Drains router events ready for each station’s current tick.
Sourcepub fn drain_ready_events_into(
&mut self,
stations: &StationSet,
router: &mut EventRouter,
events: &mut Vec<StationEvent>,
) -> Result<(), EventRouterError>
pub fn drain_ready_events_into( &mut self, stations: &StationSet, router: &mut EventRouter, events: &mut Vec<StationEvent>, ) -> Result<(), EventRouterError>
Drains all Station-ready events into reusable caller-owned output.
Trait Implementations§
Source§impl Clone for StationScheduler
impl Clone for StationScheduler
Source§fn clone(&self) -> StationScheduler
fn clone(&self) -> StationScheduler
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 StationScheduler
impl Debug for StationScheduler
Source§impl Default for StationScheduler
impl Default for StationScheduler
Source§fn default() -> StationScheduler
fn default() -> StationScheduler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StationScheduler
impl RefUnwindSafe for StationScheduler
impl Send for StationScheduler
impl Sync for StationScheduler
impl Unpin for StationScheduler
impl UnsafeUnpin for StationScheduler
impl UnwindSafe for StationScheduler
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