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_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 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.
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