Struct SettlementLag
pub struct SettlementLag {
pub n: i32,
pub unit: SettlementLagUnit,
pub business: Arc<dyn Calendar>,
pub settlement: Option<Arc<dyn Calendar>>,
pub convention: BusinessDayConvention,
}Expand description
“Advance n SettlementLagUnits on business, then settle.”
When settlement is None the result is rolled onto a business day of
business. When it is Some, the result is rolled onto a day that is a
business day of both calendars, while the count itself follows business
alone — a settlement-calendar holiday is rolled past, never counted.
Fields§
§n: i32The lag length (T+n). May be negative for a backward lag.
unit: SettlementLagUnitWhether the lag counts business or calendar days.
business: Arc<dyn Calendar>The calendar the lag is counted on.
settlement: Option<Arc<dyn Calendar>>The settlement calendar, if any. None settles on business alone.
convention: BusinessDayConventionHow the settled date is rolled over the days good on both calendars.
Implementations§
§impl SettlementLag
impl SettlementLag
pub fn business_days(
n: i32,
business: Arc<dyn Calendar>,
convention: BusinessDayConvention,
) -> Self
pub fn business_days( n: i32, business: Arc<dyn Calendar>, convention: BusinessDayConvention, ) -> Self
A lag counted in business days that settles on the calendar it counts on.
pub fn with_settlement(
n: i32,
unit: SettlementLagUnit,
business: Arc<dyn Calendar>,
settlement: Arc<dyn Calendar>,
convention: BusinessDayConvention,
) -> Self
pub fn with_settlement( n: i32, unit: SettlementLagUnit, business: Arc<dyn Calendar>, settlement: Arc<dyn Calendar>, convention: BusinessDayConvention, ) -> Self
A lag that settles onto a day good on both business and settlement.
Trait Implementations§
§impl Clone for SettlementLag
impl Clone for SettlementLag
§fn clone(&self) -> SettlementLag
fn clone(&self) -> SettlementLag
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for SettlementLag
impl !UnwindSafe for SettlementLag
impl Freeze for SettlementLag
impl Send for SettlementLag
impl Sync for SettlementLag
impl Unpin for SettlementLag
impl UnsafeUnpin for SettlementLag
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