Struct PaymentRule
pub struct PaymentRule {
pub lag: Option<LagAdjustment>,
}Expand description
How a schedule’s periods become payment dates.
Compiled once into each coupon, which is the point: a payment lag is a calendar walk, and a valuation should not repeat it.
Fields§
§lag: Option<LagAdjustment>The lag from accrual end to payment, or None for same-day payment.
Implementations§
§impl PaymentRule
impl PaymentRule
pub fn none() -> Self
pub fn none() -> Self
No lag: payment falls on the accrual end.
pub fn from_lag(lag: Option<LagAdjustment>) -> Self
pub fn from_lag(lag: Option<LagAdjustment>) -> Self
The rule a template’s payment lag implies.
pub fn business_days(offset: i32, calendar: Arc<dyn Calendar>) -> Self
pub fn business_days(offset: i32, calendar: Arc<dyn Calendar>) -> Self
A T+offset business-day lag on calendar.
pub fn payment_date(&self, accrual_end: NaiveDate) -> NaiveDate
pub fn payment_date(&self, accrual_end: NaiveDate) -> NaiveDate
The date an accrual ending on accrual_end is paid.
Trait Implementations§
§impl Clone for PaymentRule
impl Clone for PaymentRule
§fn clone(&self) -> PaymentRule
fn clone(&self) -> PaymentRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PaymentRule
impl Debug for PaymentRule
§impl PartialEq for PaymentRule
impl PartialEq for PaymentRule
impl StructuralPartialEq for PaymentRule
Auto Trait Implementations§
impl !RefUnwindSafe for PaymentRule
impl !UnwindSafe for PaymentRule
impl Freeze for PaymentRule
impl Send for PaymentRule
impl Sync for PaymentRule
impl Unpin for PaymentRule
impl UnsafeUnpin for PaymentRule
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