Trait feature_check::defs::Calculable
source · [−]pub trait Calculable: Debug {
fn get_value(
&self,
features: &HashMap<String, Version>
) -> Result<CalcResult, ParseError>;
}
Expand description
An object that may be evaluated and provide a result.
Required Methods
sourcefn get_value(
&self,
features: &HashMap<String, Version>
) -> Result<CalcResult, ParseError>
fn get_value(
&self,
features: &HashMap<String, Version>
) -> Result<CalcResult, ParseError>
Get the value of the evaluated term or expression as applied to the list of features obtained for the program.
Errors
Will propagate errors from parsing strings as crate::version::Version
objects.
Will also return an error if the expression contains comparisons of
objects of incompatible types (e.g. a version string and a comparison result).