#[non_exhaustive]pub enum MfRange {
NameFirst {
name: MfName,
operator: MfComparison,
value: MfValue,
},
ValueFirst {
value: MfValue,
operator: MfComparison,
name: MfName,
},
Interval {
lower: MfValue,
lower_inclusive: bool,
name: MfName,
upper_inclusive: bool,
upper: MfValue,
direction: MfRangeDirection,
},
}Expand description
<mf-range>, all four grammar alternatives:
<mf-range> = <mf-name> <mf-comparison> <mf-value>
| <mf-value> <mf-comparison> <mf-name>
| <mf-value> <mf-lt> <mf-name> <mf-lt> <mf-value>
| <mf-value> <mf-gt> <mf-name> <mf-gt> <mf-value>Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NameFirst
<mf-name> <mf-comparison> <mf-value>
Fields
§
operator: MfComparisonThe comparison operator between name and value.
ValueFirst
<mf-value> <mf-comparison> <mf-name>
Fields
§
operator: MfComparisonThe comparison operator between value and name.
Interval
<mf-value> <mf-lt> <mf-name> <mf-lt> <mf-value>
| <mf-value> <mf-gt> <mf-name> <mf-gt> <mf-value>
One direction (<mf-lt> family or <mf-gt> family) for both
operators, never a mixed form — the grammar itself only lists
these two alternatives, no <mf-lt> ... <mf-gt> mix and no
<mf-eq> in this position. Modeled with direction plus two
separate inclusive flags rather than two independent
MfComparison fields, so that a mixed form isn’t representable
in the type at all.
Fields
§
direction: MfRangeDirectionWhich operator family (<mf-lt> or <mf-gt>) both sides use.
Trait Implementations§
impl StructuralPartialEq for MfRange
Auto Trait Implementations§
impl Freeze for MfRange
impl RefUnwindSafe for MfRange
impl Send for MfRange
impl Sync for MfRange
impl Unpin for MfRange
impl UnsafeUnpin for MfRange
impl UnwindSafe for MfRange
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