Enum CreditCurveId
pub enum CreditCurveId {
Name {
reference: ReferenceEntity,
currency: Currency,
},
Index(CreditIndexId),
}Expand description
What the market keys a credit curve by: a reference entity in a currency, or an index. A single name and an index share no namespace.
Names sort before indices; within names by reference then currency, so a market enumerates an issuer’s curves together.
Variants§
Name
A single name’s curve, quoted in currency.
Fields
§
reference: ReferenceEntityWhat the contract references.
Index(CreditIndexId)
An index’s curve; its currency is the family’s.
Implementations§
§impl CreditCurveId
impl CreditCurveId
pub fn index(&self) -> Option<&CreditIndexId>
pub fn index(&self) -> Option<&CreditIndexId>
The index this identity names, where it names one.
pub fn reference(&self) -> Option<&ReferenceEntity>
pub fn reference(&self) -> Option<&ReferenceEntity>
The reference entity this identity names, where it names one.
Trait Implementations§
§impl Clone for CreditCurveId
impl Clone for CreditCurveId
§fn clone(&self) -> CreditCurveId
fn clone(&self) -> CreditCurveId
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 Debug for CreditCurveId
impl Debug for CreditCurveId
§impl Display for CreditCurveId
impl Display for CreditCurveId
impl Eq for CreditCurveId
§impl From<CreditIndexId> for CreditCurveId
impl From<CreditIndexId> for CreditCurveId
§fn from(index: CreditIndexId) -> Self
fn from(index: CreditIndexId) -> Self
Converts to this type from the input type.
§impl FromStr for CreditCurveId
The inverse of Display: the name form first (three
separators or more, read from the right, so an entity holding a / reads
back), then the index form; neither is refused naming both.
impl FromStr for CreditCurveId
The inverse of Display: the name form first (three
separators or more, read from the right, so an entity holding a / reads
back), then the index form; neither is refused naming both.
§impl Hash for CreditCurveId
impl Hash for CreditCurveId
§impl Ord for CreditCurveId
impl Ord for CreditCurveId
§fn cmp(&self, other: &CreditCurveId) -> Ordering
fn cmp(&self, other: &CreditCurveId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
§impl PartialEq for CreditCurveId
impl PartialEq for CreditCurveId
§impl PartialOrd for CreditCurveId
impl PartialOrd for CreditCurveId
impl StructuralPartialEq for CreditCurveId
Auto Trait Implementations§
impl Freeze for CreditCurveId
impl RefUnwindSafe for CreditCurveId
impl Send for CreditCurveId
impl Sync for CreditCurveId
impl Unpin for CreditCurveId
impl UnsafeUnpin for CreditCurveId
impl UnwindSafe for CreditCurveId
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