pub struct MilestoneTracker { /* private fields */ }Expand description
Tracks milestone contract progress.
Extracted from LoopStateMachine to reduce state machine bloat.
This struct only holds state; the actual milestone evaluation logic
remains in LoopStateMachine::handle_milestone_result.
Implementations§
Source§impl MilestoneTracker
impl MilestoneTracker
Sourcepub fn load_contract(&mut self, contract: MilestoneContract)
pub fn load_contract(&mut self, contract: MilestoneContract)
Load a milestone contract. Must be called before the run starts.
Sourcepub fn current_phase_id(&self) -> Option<&str>
pub fn current_phase_id(&self) -> Option<&str>
Returns the ID of the current (not-yet-passed) phase, or None when
no contract is loaded or all phases are complete.
Sourcepub fn current_criteria(&self) -> &[String]
pub fn current_criteria(&self) -> &[String]
Returns the acceptance criteria of the current phase as a slice.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true when there is no contract or all phases have passed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MilestoneTracker
impl RefUnwindSafe for MilestoneTracker
impl Send for MilestoneTracker
impl Sync for MilestoneTracker
impl Unpin for MilestoneTracker
impl UnsafeUnpin for MilestoneTracker
impl UnwindSafe for MilestoneTracker
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