pub struct NumericBounds {
pub minimum: Option<Number>,
pub maximum: Option<Number>,
pub exclusive_minimum: Option<Number>,
pub exclusive_maximum: Option<Number>,
pub multiple_of: Option<Number>,
}Expand description
Shared numeric bound constraints used by both IntegerSchema and NumberSchema.
Fields§
§minimum: Option<Number>§maximum: Option<Number>§exclusive_minimum: Option<Number>§exclusive_maximum: Option<Number>§multiple_of: Option<Number>Implementations§
Source§impl NumericBounds
impl NumericBounds
Sourcepub fn validate(
&self,
context: &Context<'_>,
value: &MarkedYaml<'_>,
actual: Number,
)
pub fn validate( &self, context: &Context<'_>, value: &MarkedYaml<'_>, actual: Number, )
Validate actual against all configured bounds, reporting errors to context.
Trait Implementations§
Source§impl Debug for NumericBounds
impl Debug for NumericBounds
Source§impl Default for NumericBounds
impl Default for NumericBounds
Source§fn default() -> NumericBounds
fn default() -> NumericBounds
Returns the “default value” for a type. Read more
Source§impl PartialEq for NumericBounds
impl PartialEq for NumericBounds
impl StructuralPartialEq for NumericBounds
Auto Trait Implementations§
impl Freeze for NumericBounds
impl RefUnwindSafe for NumericBounds
impl Send for NumericBounds
impl Sync for NumericBounds
impl Unpin for NumericBounds
impl UnsafeUnpin for NumericBounds
impl UnwindSafe for NumericBounds
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