pub struct SplitScheduler {
pub config: SplitSchedulerConfig,
}Expand description
Conservative automatic split scheduler.
Fields§
§config: SplitSchedulerConfigScheduler configuration.
Implementations§
Source§impl SplitScheduler
impl SplitScheduler
Sourcepub const fn new(config: SplitSchedulerConfig) -> Self
pub const fn new(config: SplitSchedulerConfig) -> Self
Creates a split scheduler.
Sourcepub fn plan(&self, samples: &[StationLoadSample]) -> SplitSchedule
pub fn plan(&self, samples: &[StationLoadSample]) -> SplitSchedule
Plans split actions from station load samples.
Sourcepub fn plan_into<'a>(
&self,
samples: &[StationLoadSample],
scratch: &'a mut SplitSchedulerScratch,
) -> SplitScheduleView<'a>
pub fn plan_into<'a>( &self, samples: &[StationLoadSample], scratch: &'a mut SplitSchedulerScratch, ) -> SplitScheduleView<'a>
Plans into fully reusable caller-owned output and working storage.
Sourcepub fn plan_with_scratch(
&self,
samples: &[StationLoadSample],
scratch: &mut HotspotSplitScratch,
) -> SplitSchedule
pub fn plan_with_scratch( &self, samples: &[StationLoadSample], scratch: &mut HotspotSplitScratch, ) -> SplitSchedule
Plans split actions using reusable hotspot cell candidate storage.
Sourcepub fn plan_with_state(
&self,
samples: &[StationLoadSample],
state: Option<&SplitSchedulerState>,
current_tick: Tick,
) -> SplitSchedule
pub fn plan_with_state( &self, samples: &[StationLoadSample], state: Option<&SplitSchedulerState>, current_tick: Tick, ) -> SplitSchedule
Plans split actions using optional cooldown state.
Sourcepub fn plan_with_state_and_scratch(
&self,
samples: &[StationLoadSample],
state: Option<&SplitSchedulerState>,
current_tick: Tick,
scratch: &mut HotspotSplitScratch,
) -> SplitSchedule
pub fn plan_with_state_and_scratch( &self, samples: &[StationLoadSample], state: Option<&SplitSchedulerState>, current_tick: Tick, scratch: &mut HotspotSplitScratch, ) -> SplitSchedule
Plans with optional cooldown state and reusable hotspot candidate storage.
Sourcepub fn plan_with_state_into<'a>(
&self,
samples: &[StationLoadSample],
state: Option<&SplitSchedulerState>,
current_tick: Tick,
scratch: &'a mut SplitSchedulerScratch,
) -> SplitScheduleView<'a>
pub fn plan_with_state_into<'a>( &self, samples: &[StationLoadSample], state: Option<&SplitSchedulerState>, current_tick: Tick, scratch: &'a mut SplitSchedulerScratch, ) -> SplitScheduleView<'a>
Plans with optional cooldown state into fully reusable scheduler storage.
Sourcepub fn execute(
&self,
schedule: &SplitSchedule,
stations: &mut StationSet,
indexes: &mut StationIndexSet,
ownership: &mut CellOwnershipTable,
) -> Result<SplitScheduleExecutionReport, SplitScheduleExecutionError>
pub fn execute( &self, schedule: &SplitSchedule, stations: &mut StationSet, indexes: &mut StationIndexSet, ownership: &mut CellOwnershipTable, ) -> Result<SplitScheduleExecutionReport, SplitScheduleExecutionError>
Executes a split schedule by applying ownership updates and migrating entities.
Sourcepub fn execute_view(
&self,
schedule: SplitScheduleView<'_>,
stations: &mut StationSet,
indexes: &mut StationIndexSet,
ownership: &mut CellOwnershipTable,
) -> Result<SplitScheduleExecutionReport, SplitScheduleExecutionError>
pub fn execute_view( &self, schedule: SplitScheduleView<'_>, stations: &mut StationSet, indexes: &mut StationIndexSet, ownership: &mut CellOwnershipTable, ) -> Result<SplitScheduleExecutionReport, SplitScheduleExecutionError>
Executes actions directly from a borrowed reusable schedule view.
Sourcepub fn execute_into<'a>(
&self,
schedule: &SplitSchedule,
stations: &mut StationSet,
indexes: &mut StationIndexSet,
ownership: &mut CellOwnershipTable,
scratch: &'a mut SplitScheduleExecutionScratch,
) -> Result<SplitScheduleExecutionView<'a>, SplitScheduleExecutionError>
pub fn execute_into<'a>( &self, schedule: &SplitSchedule, stations: &mut StationSet, indexes: &mut StationIndexSet, ownership: &mut CellOwnershipTable, scratch: &'a mut SplitScheduleExecutionScratch, ) -> Result<SplitScheduleExecutionView<'a>, SplitScheduleExecutionError>
Executes an owned schedule into fully reusable caller-owned storage.
Sourcepub fn execute_view_into<'a>(
&self,
schedule: SplitScheduleView<'_>,
stations: &mut StationSet,
indexes: &mut StationIndexSet,
ownership: &mut CellOwnershipTable,
scratch: &'a mut SplitScheduleExecutionScratch,
) -> Result<SplitScheduleExecutionView<'a>, SplitScheduleExecutionError>
pub fn execute_view_into<'a>( &self, schedule: SplitScheduleView<'_>, stations: &mut StationSet, indexes: &mut StationIndexSet, ownership: &mut CellOwnershipTable, scratch: &'a mut SplitScheduleExecutionScratch, ) -> Result<SplitScheduleExecutionView<'a>, SplitScheduleExecutionError>
Executes a borrowed schedule into fully reusable caller-owned storage.
Trait Implementations§
Source§impl Clone for SplitScheduler
impl Clone for SplitScheduler
Source§fn clone(&self) -> SplitScheduler
fn clone(&self) -> SplitScheduler
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 moreimpl Copy for SplitScheduler
Source§impl Debug for SplitScheduler
impl Debug for SplitScheduler
Auto Trait Implementations§
impl Freeze for SplitScheduler
impl RefUnwindSafe for SplitScheduler
impl Send for SplitScheduler
impl Sync for SplitScheduler
impl Unpin for SplitScheduler
impl UnsafeUnpin for SplitScheduler
impl UnwindSafe for SplitScheduler
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