Struct PinnedCurve
pub struct PinnedCurve {
curve: Arc<Curve>,
provenance: Option<Arc<CurveProvenance>>,
refit: Option<Arc<CurveRefit>>,
}Expand description
A curve on its way into a market, together with whatever it knows about how it was built.
The pinning builders take impl Into<PinnedCurve> rather than a curve and a
separate provenance argument, so what is pinned decides whether a ladder
comes with it: an Arc<Curve> has no ladder and says so, a Calibrated
carries its own. A caller can still pin a solved curve bare by unwrapping the
calibration first, but that is an explicit act rather than an omitted
argument.
Fields§
§curve: Arc<Curve>§provenance: Option<Arc<CurveProvenance>>§refit: Option<Arc<CurveRefit>>Implementations§
§impl PinnedCurve
impl PinnedCurve
pub fn with_provenance(
self,
provenance: Arc<CurveProvenance>,
) -> Result<Self, ProvenanceMismatch>
pub fn with_provenance( self, provenance: Arc<CurveProvenance>, ) -> Result<Self, ProvenanceMismatch>
This curve pinned with a ladder taken from elsewhere — the seam a caller uses to pin one solved curve under a second role, sharing the first pinning’s handle rather than copying the ladder.
§Errors
ProvenanceMismatch when the ladder’s rung count is not the curve’s
parameter count, so a mis-paired ladder never reaches a market.
pub fn with_refit(self, refit: Arc<CurveRefit>) -> Self
pub fn with_refit(self, refit: Arc<CurveRefit>) -> Self
This pin with what the curve was calibrated from, so a market holding it can solve it again from moved quotes.
pub fn refit(&self) -> Option<&Arc<CurveRefit>>
pub fn refit(&self) -> Option<&Arc<CurveRefit>>
What the curve was calibrated from, when it came from a calibration.
pub fn provenance(&self) -> Option<&Arc<CurveProvenance>>
pub fn provenance(&self) -> Option<&Arc<CurveProvenance>>
The ladder, where one came with it.
Trait Implementations§
§impl Clone for PinnedCurve
impl Clone for PinnedCurve
§fn clone(&self) -> PinnedCurve
fn clone(&self) -> PinnedCurve
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PinnedCurve
impl Debug for PinnedCurve
§impl From<Arc<Curve>> for PinnedCurve
impl From<Arc<Curve>> for PinnedCurve
§impl From<Calibrated> for PinnedCurve
impl From<Calibrated> for PinnedCurve
§fn from(calibrated: Calibrated) -> Self
fn from(calibrated: Calibrated) -> Self
A solved curve pinned with the ladder it reprices.