pub struct Periods(/* private fields */);Expand description
Count of compounding / payment periods (u32).
Implementations§
Source§impl Periods
impl Periods
Sourcepub fn new(value: u32) -> FinanceResult<Self>
pub fn new(value: u32) -> FinanceResult<Self>
Any period count (including zero where formulas allow).
Sourcepub fn at_least_one(value: u32) -> FinanceResult<Self>
pub fn at_least_one(value: u32) -> FinanceResult<Self>
At least one period (annuities, many TA windows expressed as u32).
pub fn get(self) -> u32
Trait Implementations§
impl Copy for Periods
impl Eq for Periods
Source§impl Ord for Periods
impl Ord for Periods
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Periods
impl PartialOrd for Periods
impl StructuralPartialEq for Periods
Auto Trait Implementations§
impl Freeze for Periods
impl RefUnwindSafe for Periods
impl Send for Periods
impl Sync for Periods
impl Unpin for Periods
impl UnsafeUnpin for Periods
impl UnwindSafe for Periods
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
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> ⓘ
Converts
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> ⓘ
Converts
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