pub struct ProgressContext {
pub story_index: Option<u32>,
pub total_stories: Option<u32>,
pub story_id: Option<String>,
pub current_phase: Option<String>,
}Expand description
Overall progress context holding story progress and current phase information.
This struct tracks the current story position within the total stories, and can be combined with iteration info for dual-context display.
§Display Format
During review/correct, shows both story progress and iteration:
[US-001 2/5 | Review 1/3]
Fields§
§story_index: Option<u32>Current story index (1-indexed)
total_stories: Option<u32>Total number of stories
story_id: Option<String>Current story ID (e.g., “US-001”)
current_phase: Option<String>Current phase name
Implementations§
Source§impl ProgressContext
impl ProgressContext
Sourcepub fn new(story_id: &str, story_index: u32, total_stories: u32) -> Self
pub fn new(story_id: &str, story_index: u32, total_stories: u32) -> Self
Create a new ProgressContext with story progress
Sourcepub fn with_phase(
story_id: &str,
story_index: u32,
total_stories: u32,
phase: &str,
) -> Self
pub fn with_phase( story_id: &str, story_index: u32, total_stories: u32, phase: &str, ) -> Self
Create a ProgressContext with phase information
Sourcepub fn format_story_progress(&self) -> Option<String>
pub fn format_story_progress(&self) -> Option<String>
Format the story progress part: [US-001 2/5]
Sourcepub fn format_dual_context(
&self,
iteration_info: &Option<IterationInfo>,
) -> Option<String>
pub fn format_dual_context( &self, iteration_info: &Option<IterationInfo>, ) -> Option<String>
Format a dual-context display combining story progress and iteration info.
Returns format like [US-001 2/5 | Review 1/3] when both contexts are present,
or just the story progress or iteration info if only one is available.
Trait Implementations§
Source§impl Clone for ProgressContext
impl Clone for ProgressContext
Source§fn clone(&self) -> ProgressContext
fn clone(&self) -> ProgressContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProgressContext
impl Debug for ProgressContext
Source§impl Default for ProgressContext
impl Default for ProgressContext
Source§fn default() -> ProgressContext
fn default() -> ProgressContext
Auto Trait Implementations§
impl Freeze for ProgressContext
impl RefUnwindSafe for ProgressContext
impl Send for ProgressContext
impl Sync for ProgressContext
impl Unpin for ProgressContext
impl UnwindSafe for ProgressContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more