pub struct NumericRestrictions {
pub min: Option<NumericBound>,
pub max: Option<NumericBound>,
pub unit: Option<String>,
}Expand description
Inline numeric refinement. none on a numeric type means unconstrained
(the common case). The empty restriction set is never encoded as some:
producers normalize it to none, decoders normalize a decoded empty to
none. unit is schema/help metadata only.
Fields§
§min: Option<NumericBound>§max: Option<NumericBound>§unit: Option<String>Trait Implementations§
Source§impl Clone for NumericRestrictions
impl Clone for NumericRestrictions
Source§fn clone(&self) -> NumericRestrictions
fn clone(&self) -> NumericRestrictions
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 moreAuto Trait Implementations§
impl Freeze for NumericRestrictions
impl RefUnwindSafe for NumericRestrictions
impl Send for NumericRestrictions
impl Sync for NumericRestrictions
impl Unpin for NumericRestrictions
impl UnsafeUnpin for NumericRestrictions
impl UnwindSafe for NumericRestrictions
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