Struct BondTemplate
pub struct BondTemplate {
pub name: String,
pub calendar: Arc<dyn Calendar>,
pub settlement_days: u16,
pub quote_units: QuoteUnits,
}Expand description
The market conventions of an outright-bond product: how a resolved security settles and quotes in its market. Builder-style overrides for non-standard bilateral terms.
Fields§
§name: StringTemplate name (doubles as the registry code).
calendar: Arc<dyn Calendar>Settlement calendar (the bond market’s, not the currency’s trading one).
settlement_days: u16Settlement lag in business days on calendar (e.g. T+1 UST, T+2 EGB).
quote_units: QuoteUnitsThe market’s price quote units (per 100 face for cash bonds).
Implementations§
§impl BondTemplate
impl BondTemplate
pub fn with_settlement_days(self, days: u16) -> Self
pub fn with_settlement_days(self, days: u16) -> Self
Overrides the settlement lag (business days).
pub fn with_calendar(self, calendar: Arc<dyn Calendar>) -> Self
pub fn with_calendar(self, calendar: Arc<dyn Calendar>) -> Self
Overrides the settlement calendar.
Trait Implementations§
§impl Clone for BondTemplate
impl Clone for BondTemplate
§fn clone(&self) -> BondTemplate
fn clone(&self) -> BondTemplate
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 From<BondTemplate> for AnyTemplate
impl From<BondTemplate> for AnyTemplate
§fn from(t: BondTemplate) -> Self
fn from(t: BondTemplate) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for BondTemplate
impl !UnwindSafe for BondTemplate
impl Freeze for BondTemplate
impl Send for BondTemplate
impl Sync for BondTemplate
impl Unpin for BondTemplate
impl UnsafeUnpin for BondTemplate
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