pub struct Thirty360Bond;Expand description
30/360 Bond Basis (ISDA 2006). Matches QuantLib’s
Thirty360::BondBasis. Not additive across splits.
use fasti::{DayCount, Date, Month, Thirty360Bond};
let start = Date::from_ymd(2025, Month::Jan, 1)?;
let end = Date::from_ymd(2025, Month::Jul, 1)?;
assert_eq!(Thirty360Bond.year_fraction(start, end).parts(), (1, 2));Trait Implementations§
Source§impl Clone for Thirty360Bond
impl Clone for Thirty360Bond
Source§fn clone(&self) -> Thirty360Bond
fn clone(&self) -> Thirty360Bond
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 moreimpl Copy for Thirty360Bond
Source§impl DayCount for Thirty360Bond
impl DayCount for Thirty360Bond
Source§fn day_count(&self, start: Date, end: Date) -> i64
fn day_count(&self, start: Date, end: Date) -> i64
Days between
start and end, signed by direction. Defaults
to calendar days; the 30/360 family overrides.Source§fn year_fraction(&self, start: Date, end: Date) -> Fraction
fn year_fraction(&self, start: Date, end: Date) -> Fraction
The year fraction between
start and end: signed by
direction, Fraction::ZERO for equal dates. Read moreSource§impl Debug for Thirty360Bond
impl Debug for Thirty360Bond
Source§impl Default for Thirty360Bond
impl Default for Thirty360Bond
Source§fn default() -> Thirty360Bond
fn default() -> Thirty360Bond
Returns the “default value” for a type. Read more
impl Eq for Thirty360Bond
Source§impl Hash for Thirty360Bond
impl Hash for Thirty360Bond
Source§impl PartialEq for Thirty360Bond
impl PartialEq for Thirty360Bond
impl StructuralPartialEq for Thirty360Bond
Auto Trait Implementations§
impl Freeze for Thirty360Bond
impl RefUnwindSafe for Thirty360Bond
impl Send for Thirty360Bond
impl Sync for Thirty360Bond
impl Unpin for Thirty360Bond
impl UnsafeUnpin for Thirty360Bond
impl UnwindSafe for Thirty360Bond
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