pub struct Sprint {
pub id: SprintId,
pub title: String,
pub goal: String,
pub start: Option<DateTime<Utc>>,
pub end: Option<DateTime<Utc>>,
pub daily_work_hours: Option<f64>,
pub holiday_days: Option<u32>,
pub deduction_factor: Option<f64>,
pub state: SprintState,
pub created: DateTime<Utc>,
pub updated: DateTime<Utc>,
}Expand description
A sprint that groups PBIs into a time-boxed work period.
start and end are planned dates independent of state transitions; editing sets the schedule
while Sprint::start and Sprint::close advance the state.
Fields§
§id: SprintIdStable identifier.
title: StringDisplay title.
goal: StringSprint goal (free description, multiple lines allowed).
start: Option<DateTime<Utc>>Planned start date and time, or None when unset.
end: Option<DateTime<Utc>>Planned end date and time, or None when unset.
daily_work_hours: Option<f64>Working hours per day; capacity is unavailable when unset.
holiday_days: Option<u32>Holidays within the period, deducted from the inclusive calendar-day count.
deduction_factor: Option<f64>Fraction of daily capacity retained after meetings and interruptions (0.0..=1.0).
state: SprintStateCurrent state (planned, active, or closed).
created: DateTime<Utc>§updated: DateTime<Utc>Implementations§
Source§impl Sprint
impl Sprint
Sourcepub fn new(
id: SprintId,
title: impl Into<String>,
now: DateTime<Utc>,
) -> Result<Self>
pub fn new( id: SprintId, title: impl Into<String>, now: DateTime<Utc>, ) -> Result<Self>
Create a minimal sprint in SprintState::Planned with an empty goal and no schedule.
Return Error::EmptySprintTitle when title is empty or only whitespace.
Sourcepub fn update_details(
&mut self,
title: Option<String>,
goal: Option<String>,
period: Option<(DateTime<Utc>, DateTime<Utc>)>,
now: DateTime<Utc>,
) -> Result<()>
pub fn update_details( &mut self, title: Option<String>, goal: Option<String>, period: Option<(DateTime<Utc>, DateTime<Utc>)>, now: DateTime<Utc>, ) -> Result<()>
Update the editable sprint details and refresh updated.
Fields set to None remain unchanged. A blank title or inverted period is rejected before
any field changes are applied. Return Error::NothingToUpdate when no field is supplied.
Sourcepub fn start(&mut self, now: DateTime<Utc>) -> Result<()>
pub fn start(&mut self, now: DateTime<Utc>) -> Result<()>
Start a sprint (planned → active) and update updated.
A sprint without a non-blank goal is rejected with Error::EmptySprintGoal.
Return Error::InvalidSprintTransition for any other starting state without changing it.
Sourcepub fn close(&mut self, now: DateTime<Utc>) -> Result<()>
pub fn close(&mut self, now: DateTime<Utc>) -> Result<()>
Close a sprint (active → closed) and update updated.
Return Error::InvalidSprintTransition for any other state without changing it.
Sourcepub fn set_capacity(
&mut self,
daily_work_hours: f64,
holiday_days: u32,
deduction_factor: f64,
) -> Result<()>
pub fn set_capacity( &mut self, daily_work_hours: f64, holiday_days: u32, deduction_factor: f64, ) -> Result<()>
Update settings for capacity calculations.
Count calendar days inclusively, subtract holiday_days, and multiply the result by
daily_work_hours × deduction_factor. Reject an unset period or invalid value without
changing existing settings.
Sourcepub fn capacity(&self) -> Option<SprintCapacity>
pub fn capacity(&self) -> Option<SprintCapacity>
Return working days and available hours when the schedule and capacity settings are complete.
Trait Implementations§
impl StructuralPartialEq for Sprint
Auto Trait Implementations§
impl Freeze for Sprint
impl RefUnwindSafe for Sprint
impl Send for Sprint
impl Sync for Sprint
impl Unpin for Sprint
impl UnsafeUnpin for Sprint
impl UnwindSafe for Sprint
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> 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