Struct hull_white::HullWhite

source ·
pub struct HullWhite<'a, T, U>
where T: Fn(f64) -> f64 + Sync, U: Fn(f64) -> f64 + Sync,
{ /* private fields */ }

Implementations§

source§

impl<T, U> HullWhite<'_, T, U>
where T: Fn(f64) -> f64 + Sync, U: Fn(f64) -> f64 + Sync,

source

pub fn init<'a>( a: f64, sigma: f64, yield_curve: &'a T, forward_curve: &'a U ) -> HullWhite<'a, T, U>

source

pub fn t_forward_bond_vol(&self, t: f64, t_m: f64, t_f: f64) -> f64

Returns volality of bond under the t-forward measure.

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0;
let t_m = 2.0;
let t_f = 3.0;
let yield_curve = |t:f64|0.05*t;
let forward_curve = |t:f64|t.ln();
let hull_white= hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_vol = hull_white.t_forward_bond_vol(
    t, t_m, t_f
);
source

pub fn mu_r(&self, r_t: f64, t: f64, t_m: f64) -> f64

Returns volality of bond under the t-forward measure.

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start taking the expectation
let t_m = 2.0; //horizon of the expectation
let r_t = 0.04; //rate at t
let yield_curve = |t:f64|0.05*t;
let forward_curve = |t:f64|t.ln();
let hull_white= hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_vol = hull_white.mu_r(r_t, t, t_m);
source

pub fn variance_r(&self, t: f64, t_m: f64) -> f64

Returns variance of the interest rate process

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start taking the variance
let t_m = 2.0; //horizon of the variance
let yield_curve = |t:f64|0.05*t;
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let variance = hull_white.variance_r(t, t_m);
source

pub fn bond_price_t(&self, r_t: f64, t: f64, bond_maturity: f64) -> f64

Returns price of a zero coupon bond at some future date given the interest rate at that future date

§Examples
let r_t = 0.04; //instantaneous rate at date t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let bond_maturity = 2.0;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_price = hull_white.bond_price_t(r_t, t, bond_maturity);
source

pub fn bond_price_now(&self, bond_maturity: f64) -> f64

Returns price of a zero coupon bond at current date

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let bond_maturity = 2.0;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_price = hull_white.bond_price_now(bond_maturity);
source

pub fn coupon_bond_price_t( &self, r_t: f64, t: f64, coupon_times: &[f64], coupon_rate: f64 ) -> f64

Returns price of a coupon bond at some future date

§Examples
let r_t = 0.04; //instantaneous rate at date t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let coupon_times = vec![1.25, 1.5, 1.75, 2.0]; //measure time from now (0), all should be greater than t.  Final coupon is the bond maturity
let coupon_rate = 0.05;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_price = hull_white.coupon_bond_price_t(r_t, t, &coupon_times, coupon_rate);
source

pub fn coupon_bond_price_now( &self, coupon_times: &[f64], coupon_rate: f64 ) -> f64

Returns price of a coupon bond at current date

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let coupon_times = vec![1.25, 1.5, 1.75, 2.0]; //measure time from now (0), all should be greater than t.  Final coupon is the bond maturity
let coupon_rate = 0.05;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_price = hull_white.coupon_bond_price_now(&coupon_times, coupon_rate);
source

pub fn bond_call_t( &self, r_t: f64, t: f64, option_maturity: f64, bond_maturity: f64, strike: f64 ) -> f64

Returns price of a call option on zero coupon bond at some future time

§Examples
let r_t = 0.04; //rate at time t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 1.5;
let bond_maturity = 2.0;
let strike = 0.98;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_call = hull_white.bond_call_t(r_t, t, option_maturity, bond_maturity, strike);
source

pub fn bond_call_now( &self, option_maturity: f64, bond_maturity: f64, strike: f64 ) -> f64

Returns price of a call option on zero coupon bond at current time

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let option_maturity = 1.5;
let bond_maturity = 2.0;
let strike = 0.98;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_call = hull_white.bond_call_now(option_maturity, bond_maturity, strike);
source

pub fn coupon_bond_call_t( &self, r_t: f64, t: f64, option_maturity: f64, coupon_times: &[f64], coupon_rate: f64, strike: f64 ) -> Result<f64, f64>

Returns price of a call option on a coupon bond at some future time

§Examples
let r_t = 0.04; //rate at time t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 1.5;
let coupon_times = vec![1.25, 1.5, 1.75, 2.0, 2.5, 3.0];
let coupon_rate = 0.05;
let strike = 1.0;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_call = hull_white.coupon_bond_call_t(r_t, t, option_maturity, &coupon_times, coupon_rate, strike);
source

pub fn bond_put_t( &self, r_t: f64, t: f64, option_maturity: f64, bond_maturity: f64, strike: f64 ) -> f64

Returns price of a put option on zero coupon bond at some future time

§Examples
let r_t = 0.04; //rate at time t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 1.5;
let bond_maturity = 2.0;
let strike = 0.98;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_put = hull_white.bond_put_t(r_t, t, option_maturity, bond_maturity, strike);
source

pub fn bond_put_now( &self, option_maturity: f64, bond_maturity: f64, strike: f64 ) -> f64

Returns price of a put option on zero coupon bond at current time

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let option_maturity = 1.5;
let bond_maturity = 2.0;
let strike = 0.98;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_put = hull_white.bond_put_now(option_maturity, bond_maturity, strike);
source

pub fn coupon_bond_put_t( &self, r_t: f64, t: f64, option_maturity: f64, coupon_times: &[f64], coupon_rate: f64, strike: f64 ) -> Result<f64, f64>

Returns price of a put option on a coupon bond at some future time

§Examples
let r_t = 0.04; //rate at time t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 1.5;
let coupon_times = vec![1.25, 1.5, 1.75, 2.0, 2.5, 3.0];
let coupon_rate = 0.05;
let strike = 1.0;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let bond_put = hull_white.coupon_bond_put_t(r_t, t, option_maturity, &coupon_times, coupon_rate, strike);
source

pub fn caplet_now(&self, option_maturity: f64, delta: f64, strike: f64) -> f64

Returns price of a caplet at current time

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let option_maturity = 1.5;
let delta = 0.25; //delta is the tenor of the Libor rate
let strike = 0.04;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let caplet = hull_white.caplet_now(option_maturity, delta, strike);
source

pub fn caplet_t( &self, r_t: f64, t: f64, option_maturity: f64, delta: f64, strike: f64 ) -> f64

Returns price of a caplet at some future time

§Examples
let r_t = 0.04; //rate at time t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 1.5;
let delta = 0.25; //delta is the tenor of the Libor rate
let strike = 0.04;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let caplet = hull_white.caplet_t(r_t, t, option_maturity, delta, strike);
source

pub fn euro_dollar_future_t( &self, r_t: f64, t: f64, option_maturity: f64, delta: f64 ) -> f64

Returns price of a Euro Dollar Future at some future time

§Examples
let r_t = 0.04; // rate at time t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 1.5;
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let edf = hull_white.euro_dollar_future_t(r_t,  t, option_maturity, delta);
source

pub fn euro_dollar_future_now(&self, option_maturity: f64, delta: f64) -> f64

Returns price of a Euro Dollar Future at some future time

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let option_maturity = 1.5;
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let edf = hull_white.euro_dollar_future_now(option_maturity, delta);
source

pub fn forward_libor_rate_t( &self, r_t: f64, t: f64, maturity: f64, delta: f64 ) -> f64

Returns forward Libor rate at some future time

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let maturity = 1.5;
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let forward_libor = hull_white.forward_libor_rate_t(r_t, t, maturity, delta);
source

pub fn forward_libor_rate_now(&self, maturity: f64, delta: f64) -> f64

Returns forward Libor rate at current time

§Examples
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let maturity = 1.5;
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let forward_libor = hull_white.forward_libor_rate_now(maturity, delta);
source

pub fn libor_rate_t(&self, r_t: f64, t: f64, delta: f64) -> f64

Returns Libor rate at some future time

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let libor = hull_white.libor_rate_t(r_t, t, delta);
source

pub fn forward_swap_rate_t( &self, r_t: f64, t: f64, swap_initiation: f64, num_swap_payments: usize, delta: f64 ) -> f64

Returns forward swap rate at some future time

§Examples
let r_t = 0.04; //rate at t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let swap_initiation = 1.5;
let num_swap_payments = 14;
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let forward_swap = hull_white.forward_swap_rate_t(r_t,  t, swap_initiation, num_swap_payments, delta);
source

pub fn swap_rate_t( &self, r_t: f64, t: f64, num_swap_payments: usize, delta: f64 ) -> f64

Returns swap rate at some future time

§Examples
let r_t = 0.04; //rate at t
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let num_swap_payments = 16;
let delta = 0.25; //delta is the tenor of the Libor rate
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let swap_rate = hull_white.swap_rate_t(r_t, t, num_swap_payments, delta);
source

pub fn swap_price_t( &self, r_t: f64, t: f64, swap_maturity: f64, delta: f64, swap_rate: f64 ) -> f64

Returns price of a swap at some future time, not necessarily at initiation of the swap

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let swap_maturity = 5.0;
let delta = 0.25; //delta is the tenor of the Libor rate
let swap_rate = 0.04; //at initiation, the swap rate is such that the swap has zero value
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let swap = hull_white.swap_price_t(r_t, t, swap_maturity, delta, swap_rate);
source

pub fn swap_price_t_init( &self, r_t: f64, t: f64, swap_start: f64, num_swap_payments: usize, delta: f64, swap_rate: f64 ) -> f64

Returns price of a swap at the start of the swap

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let num_swap_payments = 16;
let delta = 0.25; //delta is the tenor of the Libor rate
let swap_rate = 0.04;
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let swap = hull_white.swap_price_t_init(r_t, t, t, num_swap_payments, delta, swap_rate);
source

pub fn european_payer_swaption_t( &self, r_t: f64, t: f64, option_maturity: f64, num_swap_payments: usize, delta: f64, swap_rate: f64 ) -> Result<f64, f64>

Returns price of a payer swaption at some future time t

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 2.0;
let num_swap_payments = 16;
let delta = 0.25; //delta is the tenor of the Libor rate
let swap_rate = 0.04; //the swap rate is what the payer agrees to pay if option is exercised
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let swaption = hull_white.european_payer_swaption_t(r_t, t, option_maturity, num_swap_payments, delta, swap_rate).unwrap();
source

pub fn european_receiver_swaption_t( &self, r_t: f64, t: f64, option_maturity: f64, num_swap_payments: usize, delta: f64, swap_rate: f64 ) -> Result<f64, f64>

Returns price of a payer swaption at some future time t

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 2.0;
let num_swap_payments = 16;
let delta = 0.25; //delta is the tenor of the Libor rate
let swap_rate = 0.04; //the swap rate is what the payer agrees to pay if option is exercised
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let swaption = hull_white.european_receiver_swaption_t(r_t, t, option_maturity, num_swap_payments, delta, swap_rate).unwrap();
source

pub fn american_payer_swaption_t( &self, r_t: f64, t: f64, option_maturity: f64, num_swap_payments: usize, delta: f64, swap_rate: f64, num_steps: usize ) -> f64

Returns price of an American payer swaption at some future time t

§Comments

This function uses a tree to solve and will take longer to compute than other pricing functions.

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 2.0;
let num_swap_payments = 16;
let delta = 0.25; //delta is the tenor of the Libor rate
let swap_rate = 0.04; //the swap rate is what the payer agrees to pay if option is exercised
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let num_tree_steps = 100;
let swaption = hull_white.american_payer_swaption_t(
    r_t, t, option_maturity, num_swap_payments, delta, swap_rate, num_tree_steps
);
source

pub fn american_receiver_swaption_t( &self, r_t: f64, t: f64, option_maturity: f64, num_swap_payments: usize, delta: f64, swap_rate: f64, num_steps: usize ) -> f64

Returns price of an American payer swaption at some future time t

§Comments

This function uses a tree to solve and will take longer to compute than other pricing functions.

§Examples
let r_t = 0.04; //current rate
let a = 0.2; //speed of mean reversion for underlying Hull White process
let sigma = 0.3; //volatility of underlying Hull White process
let t = 1.0; //time from "now" (0) to start valuing the bond
let option_maturity = 2.0;
let num_swap_payments = 16;
let delta = 0.25; //delta is the tenor of the Libor rate
let swap_rate = 0.04; //the swap rate is what the payer agrees to pay if option is exercised
let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity)
let forward_curve = |t:f64|t.ln();
let hull_white = hull_white::HullWhite::init(a, sigma, &yield_curve, &forward_curve);
let num_tree_steps = 100;
let swaption = hull_white.american_receiver_swaption_t(
    r_t, t, option_maturity, num_swap_payments, delta, swap_rate, num_tree_steps
);

Auto Trait Implementations§

§

impl<'a, T, U> Freeze for HullWhite<'a, T, U>

§

impl<'a, T, U> RefUnwindSafe for HullWhite<'a, T, U>

§

impl<'a, T, U> Send for HullWhite<'a, T, U>

§

impl<'a, T, U> Sync for HullWhite<'a, T, U>

§

impl<'a, T, U> Unpin for HullWhite<'a, T, U>

§

impl<'a, T, U> UnwindSafe for HullWhite<'a, T, U>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.