Struct vos_core::IntegerConstraint
source · [−]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: IntegerKindmin: 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
sourceimpl Clone for IntegerConstraint
impl Clone for IntegerConstraint
sourcefn clone(&self) -> IntegerConstraint
fn clone(&self) -> IntegerConstraint
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for IntegerConstraint
impl Debug for IntegerConstraint
sourceimpl Default for IntegerConstraint
impl Default for IntegerConstraint
sourcefn default() -> IntegerConstraint
fn default() -> IntegerConstraint
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for IntegerConstraint
impl<'de> Deserialize<'de> for IntegerConstraint
sourcefn 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
sourceimpl Serialize for IntegerConstraint
impl Serialize for IntegerConstraint
Auto Trait Implementations
impl RefUnwindSafe for IntegerConstraint
impl Send for IntegerConstraint
impl Sync for IntegerConstraint
impl Unpin for IntegerConstraint
impl UnwindSafe for IntegerConstraint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more