pub struct SolverConfigBuilder { /* private fields */ }Expand description
Builder for SolverConfig.
Each setter consumes self and returns a new builder; call build
to produce the final config. All setters are const fn, so a config can be
assembled in a const context.
Implementations§
Source§impl SolverConfigBuilder
impl SolverConfigBuilder
Sourcepub const fn nr_max_iterations(self, value: u32) -> Self
pub const fn nr_max_iterations(self, value: u32) -> Self
Sets nr_max_iterations.
Sourcepub const fn price_tolerance(self, value: f64) -> Self
pub const fn price_tolerance(self, value: f64) -> Self
Sets price_tolerance.
Sourcepub const fn iv_tolerance(self, value: f64) -> Self
pub const fn iv_tolerance(self, value: f64) -> Self
Sets iv_tolerance.
Sourcepub const fn vega_floor(self, value: f64) -> Self
pub const fn vega_floor(self, value: f64) -> Self
Sets vega_floor.
Sourcepub const fn brent_max_iterations(self, value: u32) -> Self
pub const fn brent_max_iterations(self, value: u32) -> Self
Sets brent_max_iterations.
Sourcepub const fn near_expiry_cutoff_hours(self, value: f64) -> Self
pub const fn near_expiry_cutoff_hours(self, value: f64) -> Self
Sets near_expiry_cutoff_hours.
Sourcepub const fn build(self) -> SolverConfig
pub const fn build(self) -> SolverConfig
Consumes the builder and returns the configured SolverConfig.
Trait Implementations§
Source§impl Clone for SolverConfigBuilder
impl Clone for SolverConfigBuilder
Source§fn clone(&self) -> SolverConfigBuilder
fn clone(&self) -> SolverConfigBuilder
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 moreAuto Trait Implementations§
impl Freeze for SolverConfigBuilder
impl RefUnwindSafe for SolverConfigBuilder
impl Send for SolverConfigBuilder
impl Sync for SolverConfigBuilder
impl Unpin for SolverConfigBuilder
impl UnsafeUnpin for SolverConfigBuilder
impl UnwindSafe for SolverConfigBuilder
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