pub struct ArmsLengthRange {
pub lower_quartile: Decimal,
pub median: Decimal,
pub upper_quartile: Decimal,
pub iqr: Decimal,
pub comparable_count: usize,
pub study_date: NaiveDate,
pub validity_months: u32,
}Expand description
Arm’s length range for benchmarking.
Fields§
§lower_quartile: DecimalLower quartile (25th percentile).
median: DecimalMedian (50th percentile).
upper_quartile: DecimalUpper quartile (75th percentile).
iqr: DecimalInterquartile range.
comparable_count: usizeNumber of comparables used.
study_date: NaiveDateDate of the benchmarking study.
validity_months: u32Validity period in months.
Implementations§
Source§impl ArmsLengthRange
impl ArmsLengthRange
Sourcepub fn new(
lower_quartile: Decimal,
median: Decimal,
upper_quartile: Decimal,
comparable_count: usize,
study_date: NaiveDate,
) -> Self
pub fn new( lower_quartile: Decimal, median: Decimal, upper_quartile: Decimal, comparable_count: usize, study_date: NaiveDate, ) -> Self
Create a new arm’s length range from benchmarking data.
Sourcepub fn is_within_range(&self, margin: Decimal) -> bool
pub fn is_within_range(&self, margin: Decimal) -> bool
Check if a margin falls within the arm’s length range.
Sourcepub fn is_valid_on(&self, date: NaiveDate) -> bool
pub fn is_valid_on(&self, date: NaiveDate) -> bool
Check if the range is still valid.
Sourcepub fn get_adjustment(&self, margin: Decimal) -> Option<Decimal>
pub fn get_adjustment(&self, margin: Decimal) -> Option<Decimal>
Get adjustment needed to bring margin within range.
Trait Implementations§
Source§impl Clone for ArmsLengthRange
impl Clone for ArmsLengthRange
Source§fn clone(&self) -> ArmsLengthRange
fn clone(&self) -> ArmsLengthRange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArmsLengthRange
impl Debug for ArmsLengthRange
Source§impl<'de> Deserialize<'de> for ArmsLengthRange
impl<'de> Deserialize<'de> for ArmsLengthRange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ArmsLengthRange
impl RefUnwindSafe for ArmsLengthRange
impl Send for ArmsLengthRange
impl Sync for ArmsLengthRange
impl Unpin for ArmsLengthRange
impl UnwindSafe for ArmsLengthRange
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