Struct FlatSpreadView
pub struct FlatSpreadView<'a, R: Scalar> {
data: &'a FlatSpread,
spread: R,
}Expand description
FlatSpread lifted into one pricing mode.
Fields§
§data: &'a FlatSpread§spread: RTrait Implementations§
§impl<'a, R: Clone + Scalar> Clone for FlatSpreadView<'a, R>
impl<'a, R: Clone + Scalar> Clone for FlatSpreadView<'a, R>
§fn clone(&self) -> FlatSpreadView<'a, R>
fn clone(&self) -> FlatSpreadView<'a, R>
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<'a, R: Debug + Scalar> Debug for FlatSpreadView<'a, R>
impl<'a, R: Debug + Scalar> Debug for FlatSpreadView<'a, R>
§impl<R: Scalar> YieldCurve<R> for FlatSpreadView<'_, R>
impl<R: Scalar> YieldCurve<R> for FlatSpreadView<'_, R>
§fn reference_date(&self) -> NaiveDate
fn reference_date(&self) -> NaiveDate
The date at which the discount factor is 1.
§fn log_discount(&self, date: NaiveDate) -> Result<R, CurveError>
fn log_discount(&self, date: NaiveDate) -> Result<R, CurveError>
The log discount factor to
date. Read more§fn discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
fn discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
The discount factor to the proleptic-Gregorian day number
ordinal. Read more§fn log_discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
fn log_discount_at_ordinal(&self, ordinal: i32) -> Result<R, CurveError>
§fn rate_day_count(&self) -> DayCountFraction
fn rate_day_count(&self) -> DayCountFraction
The day count this curve forms a rate under. Read more
§fn zero_rate(&self, date: NaiveDate) -> Result<R, CurveError>
fn zero_rate(&self, date: NaiveDate) -> Result<R, CurveError>
The continuously-compounded zero rate to
date. Read more§fn forward_rate(
&self,
start: NaiveDate,
end: NaiveDate,
) -> Result<R, CurveError>
fn forward_rate( &self, start: NaiveDate, end: NaiveDate, ) -> Result<R, CurveError>
Auto Trait Implementations§
impl<'a, R> Freeze for FlatSpreadView<'a, R>where
R: Freeze,
impl<'a, R> RefUnwindSafe for FlatSpreadView<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for FlatSpreadView<'a, R>
impl<'a, R> Sync for FlatSpreadView<'a, R>
impl<'a, R> Unpin for FlatSpreadView<'a, R>where
R: Unpin,
impl<'a, R> UnsafeUnpin for FlatSpreadView<'a, R>where
R: UnsafeUnpin,
impl<'a, R> UnwindSafe for FlatSpreadView<'a, R>where
R: UnwindSafe,
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