pub struct IntegerConstraint {
pub kind: IntegerKind,
pub min: Option<BigInt>,
pub max: Option<BigInt>,
pub min_length: Option<BigInt>,
pub max_length: Option<BigInt>,
pub multiple_of: Option<BigInt>,
pub examples: Vec<BigInt>,
pub info: SharedConstraint,
}Expand description
n: i32[=1]
n: i32[<1]
n: i32[1..=2]
n: i32[1 < n < 2]Fields§
§kind: IntegerKind§min: Option<BigInt>Minimum length of utf8 string
max: Option<BigInt>Maximum length of utf8 string
min_length: Option<BigInt>Minimum number of unicode characters
max_length: Option<BigInt>Maximum number of unicode characters
multiple_of: Option<BigInt>Check if number is multiple of x
examples: Vec<BigInt>§info: SharedConstraintImplementations§
Trait Implementations§
Source§impl Clone for IntegerConstraint
impl Clone for IntegerConstraint
Source§fn clone(&self) -> IntegerConstraint
fn clone(&self) -> IntegerConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntegerConstraint
impl Debug for IntegerConstraint
Source§impl Default for IntegerConstraint
impl Default for IntegerConstraint
Source§fn default() -> IntegerConstraint
fn default() -> IntegerConstraint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IntegerConstraint
impl<'de> Deserialize<'de> for IntegerConstraint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IntegerConstraint
impl RefUnwindSafe for IntegerConstraint
impl Send for IntegerConstraint
impl Sync for IntegerConstraint
impl Unpin for IntegerConstraint
impl UnwindSafe for IntegerConstraint
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