Skip to main content

fast_basis

Function fast_basis 

fn fast_basis(day_count: DayCountFraction) -> Option<f64>
Expand description

The constant divisor K for a convention that is exactly actual_days / K, or None for every convention that is not — the classification that lets an ordinal query measure time by integer subtraction. Exhaustive with no wildcard on purpose: a new convention must be classified here or the crate stops compiling, because defaulting one into the fast path would return a plausible wrong year fraction on every credit query rather than failing.