Struct ScenarioLeg
pub struct ScenarioLeg {
pub selector: Selector,
pub shift: Shift,
pub shift_type: Option<ShiftType>,
}Expand description
One leg of a scenario: what it moves, and by how much.
Named apart from Leg, the compiled strip of
coupons a trade pays: the two share nothing but the word, and only one of
them is a thing that accrues.
Fields§
§selector: SelectorWhich inputs the leg reaches.
shift: ShiftThe quote-space move.
shift_type: Option<ShiftType>Relative or absolute; None keeps the selected input’s own
convention.
Implementations§
§impl ScenarioLeg
impl ScenarioLeg
fn check_shift_type(&self) -> Result<(), ScenarioError>
fn check_shift_type(&self) -> Result<(), ScenarioError>
Refuses a shift type the selected input cannot take: a curve moves absolutely in its quote, an FX spot relatively, and a vol either way.
Trait Implementations§
§impl Clone for ScenarioLeg
impl Clone for ScenarioLeg
§fn clone(&self) -> ScenarioLeg
fn clone(&self) -> ScenarioLeg
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 ScenarioLeg
impl Debug for ScenarioLeg
§impl PartialEq for ScenarioLeg
impl PartialEq for ScenarioLeg
impl StructuralPartialEq for ScenarioLeg
Auto Trait Implementations§
impl Freeze for ScenarioLeg
impl RefUnwindSafe for ScenarioLeg
impl Send for ScenarioLeg
impl Sync for ScenarioLeg
impl Unpin for ScenarioLeg
impl UnsafeUnpin for ScenarioLeg
impl UnwindSafe for ScenarioLeg
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