pub struct Params(pub BTreeMap<String, f64>);Expand description
Resolved parameters.
Tuple Fields§
§0: BTreeMap<String, f64>Implementations§
Source§impl Params
impl Params
Sourcepub fn resolve(
raw: &BTreeMap<String, Num>,
overrides: &BTreeMap<String, f64>,
) -> Result<Self, Error>
pub fn resolve( raw: &BTreeMap<String, Num>, overrides: &BTreeMap<String, f64>, ) -> Result<Self, Error>
The parameters of the file with overrides: expressions may use the other parameters, in
any order (no cycle).
Sourcepub fn num(&self, n: &Num) -> Result<f64, Error>
pub fn num(&self, n: &Num) -> Result<f64, Error>
The value of a number, or of an expression of the parameters.
Sourcepub fn opt(&self, n: &Option<Num>, default: f64) -> Result<f64, Error>
pub fn opt(&self, n: &Option<Num>, default: f64) -> Result<f64, Error>
The value of n, or default when it is not given.
Trait Implementations§
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnsafeUnpin for Params
impl UnwindSafe for Params
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more