Skip to main content

SwapConventions

Struct SwapConventions 

struct SwapConventions {
Show 20 fields family: ProductFamily, generation: Option<DateGenerationRule>, currency_code: String, frequency: Period, fixed_frequency: Option<Period>, calendar: Arc<dyn Calendar>, business_day: BusinessDayConvention, roll: RollConvention, fixed_day_count: DayCountFraction, float_day_count: DayCountFraction, payment_lag: Period, payment_calendar: Option<Arc<dyn Calendar>>, payment_convention: Option<BusinessDayConvention>, float_payment_lag: Option<Period>, float_payment_calendar: Option<Arc<dyn Calendar>>, float_payment_convention: Option<BusinessDayConvention>, accumulation: AccrualCompounding, float_reset: Option<Period>, par_coupons: bool, fixed_business_day: Option<BusinessDayConvention>,
}
Expand description

The conventions one swap template supplies to a ProductBuilder.

This was a twelve-element tuple destructured out of a match, and swap_builder_on_index’s own comment deferred replacing it: “The real shrink is a conventions struct in place of that tuple — a refactor, not a reflow, so it is deferred rather than smuggled into a rename change.” This is that refactor. A tuple of twelve positional fields, four of which are Period-or-DayCountFraction-shaped, is one transposition away from a silent misbuild that still compiles.

Fields§

§family: ProductFamily§generation: Option<DateGenerationRule>

The direction the caller stated on the template, if any.

§currency_code: String§frequency: Period§fixed_frequency: Option<Period>§calendar: Arc<dyn Calendar>§business_day: BusinessDayConvention§roll: RollConvention§fixed_day_count: DayCountFraction§float_day_count: DayCountFraction§payment_lag: Period§payment_calendar: Option<Arc<dyn Calendar>>§payment_convention: Option<BusinessDayConvention>§float_payment_lag: Option<Period>

The floating leg’s own three, each None meaning inherit the shared value rather than use the default.

§float_payment_calendar: Option<Arc<dyn Calendar>>§float_payment_convention: Option<BusinessDayConvention>§accumulation: AccrualCompounding§float_reset: Option<Period>§par_coupons: bool§fixed_business_day: Option<BusinessDayConvention>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.