pub struct StepScope<'a, 'b, S: PlanningSolution> { /* private fields */ }Expand description
Scope for a single step within a phase.
Implementations§
Source§impl<'a, 'b, S: PlanningSolution> StepScope<'a, 'b, S>
impl<'a, 'b, S: PlanningSolution> StepScope<'a, 'b, S>
Sourcepub fn new(phase_scope: &'a mut PhaseScope<'b, S>) -> Self
pub fn new(phase_scope: &'a mut PhaseScope<'b, S>) -> Self
Creates a new step scope.
Sourcepub fn step_index(&self) -> u64
pub fn step_index(&self) -> u64
Returns the step index within the phase.
Sourcepub fn step_score(&self) -> Option<&S::Score>
pub fn step_score(&self) -> Option<&S::Score>
Returns the step score.
Sourcepub fn set_step_score(&mut self, score: S::Score)
pub fn set_step_score(&mut self, score: S::Score)
Sets the step score.
Sourcepub fn phase_scope(&self) -> &PhaseScope<'b, S>
pub fn phase_scope(&self) -> &PhaseScope<'b, S>
Returns a reference to the phase scope.
Sourcepub fn phase_scope_mut(&mut self) -> &mut PhaseScope<'b, S>
pub fn phase_scope_mut(&mut self) -> &mut PhaseScope<'b, S>
Returns a mutable reference to the phase scope.
Sourcepub fn score_director(&self) -> &dyn ScoreDirector<S>
pub fn score_director(&self) -> &dyn ScoreDirector<S>
Convenience: returns the score director.
Sourcepub fn score_director_mut(&mut self) -> &mut dyn ScoreDirector<S>
pub fn score_director_mut(&mut self) -> &mut dyn ScoreDirector<S>
Convenience: returns a mutable score director.
Sourcepub fn calculate_score(&mut self) -> S::Score
pub fn calculate_score(&mut self) -> S::Score
Convenience: calculates the current score.
Auto Trait Implementations§
impl<'a, 'b, S> Freeze for StepScope<'a, 'b, S>
impl<'a, 'b, S> !RefUnwindSafe for StepScope<'a, 'b, S>
impl<'a, 'b, S> Send for StepScope<'a, 'b, S>
impl<'a, 'b, S> !Sync for StepScope<'a, 'b, S>
impl<'a, 'b, S> Unpin for StepScope<'a, 'b, S>
impl<'a, 'b, S> !UnwindSafe for StepScope<'a, 'b, S>
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