pub struct EstimateConversion { /* private fields */ }Expand description
One series’ resolved estimate conversion (T013).
Resolved once per series: the board’s registry is read at resolve time, and
every member’s estimate is then converted through EstimateConversion::value_of,
so a 10,000-issue series does not re-read the configuration per issue.
Implementations§
Source§impl EstimateConversion
impl EstimateConversion
Sourcepub fn resolve(config: &Config, unit: &str) -> Option<Self>
pub fn resolve(config: &Config, unit: &str) -> Option<Self>
Resolve the shared conversion for unit, or None when the board does not
declare that unit.
None is not a fallback: the registry has no factor for the unit, so
crate::wip::WipConfig::convert would refuse every value anyway (C-003).
The caller reports it once instead of converting per issue.
Sourcepub fn value_of(&self, number: u32, stated: Option<&str>) -> EstimateValue
pub fn value_of(&self, number: u32, stated: Option<&str>) -> EstimateValue
One issue’s stated estimate, read and converted in this unit.
The crate’s one estimate seam: EstimateValue::parse (raw text kept
verbatim; prose units fold to their board symbol and every term is converted
separately) followed by EstimateValue::converted_to (the registry’s
arithmetic). A blank or absent statement is
EstimateValue::unestimated — “no estimate” is not an error, and it never
becomes a zero.
Trait Implementations§
Source§impl Clone for EstimateConversion
impl Clone for EstimateConversion
Auto Trait Implementations§
impl Freeze for EstimateConversion
impl RefUnwindSafe for EstimateConversion
impl Send for EstimateConversion
impl Sync for EstimateConversion
impl Unpin for EstimateConversion
impl UnsafeUnpin for EstimateConversion
impl UnwindSafe for EstimateConversion
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