Enum CallYieldError
#[non_exhaustive]pub enum CallYieldError {
MakeWhole {
date: NaiveDate,
},
Past {
date: NaiveDate,
settlement: NaiveDate,
},
Solve(YieldSolveError),
}Expand description
Why a yield to a call could not be taken.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MakeWhole
The entry redeems at a make-whole price, whose amount depends on a curve.
There is no curve-free yield to a curve-dependent redemption, so this is reported rather than approximated: a non-finite number escaping into a quote is exactly what a typed taxonomy exists to prevent.
Past
The exercise date is not after settlement, so there is no scenario left.
Solve(YieldSolveError)
The scenario’s flows admit no yield reproducing the price.
Implementations§
§impl CallYieldError
impl CallYieldError
pub fn is_unsolved(&self) -> bool
pub fn is_unsolved(&self) -> bool
Whether the yield solve itself found no answer, rather than the call having no curve-free yield or no scenario left. Exhaustive.
Trait Implementations§
§impl Clone for CallYieldError
impl Clone for CallYieldError
§fn clone(&self) -> CallYieldError
fn clone(&self) -> CallYieldError
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 CallYieldError
§impl Debug for CallYieldError
impl Debug for CallYieldError
§impl Display for CallYieldError
impl Display for CallYieldError
§impl Error for CallYieldError
impl Error for CallYieldError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl From<CallYieldError> for BondReadingError
impl From<CallYieldError> for BondReadingError
§fn from(e: CallYieldError) -> Self
fn from(e: CallYieldError) -> Self
Converts to this type from the input type.
§impl From<YieldSolveError> for CallYieldError
impl From<YieldSolveError> for CallYieldError
§fn from(e: YieldSolveError) -> Self
fn from(e: YieldSolveError) -> Self
Converts to this type from the input type.
§impl PartialEq for CallYieldError
impl PartialEq for CallYieldError
impl StructuralPartialEq for CallYieldError
Auto Trait Implementations§
impl Freeze for CallYieldError
impl RefUnwindSafe for CallYieldError
impl Send for CallYieldError
impl Sync for CallYieldError
impl Unpin for CallYieldError
impl UnsafeUnpin for CallYieldError
impl UnwindSafe for CallYieldError
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