pub enum ParameterRange {
None,
FloatingPoint(FloatingPointRange),
Integer(IntegerRange),
}Expand description
Range constraints for a parameter
Variants§
None
No range constraints
FloatingPoint(FloatingPointRange)
Floating point range
Integer(IntegerRange)
Integer range
Implementations§
Source§impl ParameterRange
impl ParameterRange
Sourcepub fn contains(&self, value: &ParameterValue) -> bool
pub fn contains(&self, value: &ParameterValue) -> bool
THE range predicate. Every set — ParameterServer::set, the six
service handlers, the typed API — and every declare-time default check
reaches this one function, so an integer and a floating-point value
cannot be judged by two different rules (issue 1150 class).
A value whose type does not match the arm (a string against an
integer range, a NotSet) is not the range’s business and passes; the
type check is a separate, earlier verdict.
Trait Implementations§
Source§impl Clone for ParameterRange
impl Clone for ParameterRange
Source§fn clone(&self) -> ParameterRange
fn clone(&self) -> ParameterRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParameterRange
Source§impl Debug for ParameterRange
impl Debug for ParameterRange
Source§impl Default for ParameterRange
impl Default for ParameterRange
Source§fn default() -> ParameterRange
fn default() -> ParameterRange
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParameterRange
impl RefUnwindSafe for ParameterRange
impl Send for ParameterRange
impl Sync for ParameterRange
impl Unpin for ParameterRange
impl UnsafeUnpin for ParameterRange
impl UnwindSafe for ParameterRange
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