pub enum NumberPattern {
Any,
Value(f64),
Range(RangeInclusive<f64>),
GreaterThan(f64),
GreaterThanOrEqual(f64),
LessThan(f64),
LessThanOrEqual(f64),
NaN,
Infinity,
NegInfinity,
}
Expand description
Pattern for matching number values in dCBOR.
Variants§
Any
Matches any number.
Value(f64)
Matches the exact number.
Range(RangeInclusive<f64>)
Matches numbers within a range, inclusive (..=).
GreaterThan(f64)
Matches numbers that are greater than the specified value.
GreaterThanOrEqual(f64)
Matches numbers that are greater than or equal to the specified value.
LessThan(f64)
Matches numbers that are less than the specified value.
LessThanOrEqual(f64)
Matches numbers that are less than or equal to the specified value.
NaN
Matches numbers that are NaN (Not a Number).
Infinity
Matches positive infinity.
NegInfinity
Matches negative infinity.
Implementations§
Source§impl NumberPattern
impl NumberPattern
Sourcepub fn range<A>(range: RangeInclusive<A>) -> Self
pub fn range<A>(range: RangeInclusive<A>) -> Self
Creates a new NumberPattern
that matches numbers within the specified
range.
Sourcepub fn greater_than<T>(value: T) -> Self
pub fn greater_than<T>(value: T) -> Self
Creates a new NumberPattern
that matches numbers greater than the
specified value.
Sourcepub fn greater_than_or_equal<T>(value: T) -> Self
pub fn greater_than_or_equal<T>(value: T) -> Self
Creates a new NumberPattern
that matches numbers greater than or
equal to the specified value.
Sourcepub fn less_than<T>(value: T) -> Self
pub fn less_than<T>(value: T) -> Self
Creates a new NumberPattern
that matches numbers less than the
specified value.
Sourcepub fn less_than_or_equal<T>(value: T) -> Self
pub fn less_than_or_equal<T>(value: T) -> Self
Creates a new NumberPattern
that matches numbers less than or equal
to the specified value.
Sourcepub fn neg_infinity() -> Self
pub fn neg_infinity() -> Self
Creates a new NumberPattern
that matches negative infinity.
Trait Implementations§
Source§impl Clone for NumberPattern
impl Clone for NumberPattern
Source§fn clone(&self) -> NumberPattern
fn clone(&self) -> NumberPattern
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more