pub enum Rate {
Flat(f64),
Curve(RateTermStructure),
}Expand description
Supplies a continuously compounded flat rate or an owned term structure.
Non-finite scalar inputs return Error::InvalidInput on validation.
See BlackScholesMertonParameters::new for mixing scalar rates and curves.
Variants§
Flat(f64)
Supplies a continuously compounded scalar rate, validated by the model.
Curve(RateTermStructure)
Supplies an owned, validated rate curve.
Trait Implementations§
Source§impl From<RateTermStructure> for Rate
impl From<RateTermStructure> for Rate
Source§fn from(curve: RateTermStructure) -> Self
fn from(curve: RateTermStructure) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Rate
Auto Trait Implementations§
impl !RefUnwindSafe for Rate
impl !UnwindSafe for Rate
impl Freeze for Rate
impl Send for Rate
impl Sync for Rate
impl Unpin for Rate
impl UnsafeUnpin for Rate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more