pub enum Feature {
Boolean(String),
Plain(String, FeatureValue),
Range {
name: String,
before: Option<(FeatureValue, Comparison)>,
after: Option<(Comparison, FeatureValue)>,
},
}Expand description
( … ) in a query.
Variants§
Boolean(String)
(name).
Plain(String, FeatureValue)
(name: value), min- and max- names included.
Range
(name >= value) or (value < name < value), written in the
order it was, the name on the side given.
Fields
§
before: Option<(FeatureValue, Comparison)>value op name.
§
after: Option<(Comparison, FeatureValue)>name op value.
Implementations§
Source§impl Feature
impl Feature
Sourcepub fn evaluate(&self, env: &Environment) -> Option<bool>
pub fn evaluate(&self, env: &Environment) -> Option<bool>
Some(true), Some(false), or None for unknown.
Sourcepub fn evaluate_with(
&self,
env: &Environment,
lengths: &QueryLengths,
) -> Option<bool>
pub fn evaluate_with( &self, env: &Environment, lengths: &QueryLengths, ) -> Option<bool>
Feature::evaluate, with relative lengths relative to lengths.
Trait Implementations§
impl StructuralPartialEq for Feature
Auto Trait Implementations§
impl Forget for Feature
impl Freeze for Feature
impl Move for Feature
impl RefUnwindSafe for Feature
impl Send for Feature
impl Sync for Feature
impl Unpin for Feature
impl UnsafeUnpin for Feature
impl UnwindSafe for Feature
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