Enum fxbox_taxonomy::values::Range [] [src]

pub enum Range {
    Leq(Value),
    Geq(Value),
    BetweenEq {
        min: Value,
        max: Value,
    },
    OutOfStrict {
        min: Value,
        max: Value,
    },
    Eq(Value),
}

A comparison between two values.

Variants

Leq

Leq(x) accepts any value v such that v <= x.

Geq

Geq(x) accepts any value v such that v >= x.

BetweenEq

BetweenEq {min, max} accepts any value v such that min <= v and v <= max. If max < min, it never accepts anything.

Fields

min
max
OutOfStrict

OutOfStrict {min, max} accepts any value v such that v < min or max < v

Fields

min
max
Eq

Eq(x) accespts any value v such that v == x

Methods

impl Range

fn contains(&self, value: &Value) -> bool

Determine if a value is accepted by this range.

fn get_type(&self) -> Result<Type, ()>

Get the type associated to this range.

If this range has a min and a max with conflicting types, produce an error.

Trait Implementations

impl Serialize for Range

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

impl Deserialize for Range

fn deserialize<__D>(deserializer: &mut __D) -> Result<Range, __D::Error> where __D: Deserializer

Derived Implementations

impl Clone for Range

fn clone(&self) -> Range

1.0.0fn clone_from(&mut self, source: &Self)