pub struct NumberLiteral {
pub multiple_of: Option<f64>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub exclusive_minimum: bool,
pub exclusive_maximum: bool,
}
Expand description
The constraints that may be applied to a number literal schema.
Fields§
§multiple_of: Option<f64>
The number must be a multiple of this value.
minimum: Option<f64>
The minimum value of the number.
maximum: Option<f64>
The maximum value of the number.
exclusive_minimum: bool
Whether the minimum value is exclusive.
Default is false
.
exclusive_maximum: bool
Whether the maximum value is exclusive.
Default is false
.
Trait Implementations§
Source§impl Clone for NumberLiteral
impl Clone for NumberLiteral
Source§fn clone(&self) -> NumberLiteral
fn clone(&self) -> NumberLiteral
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 NumberLiteral
impl Debug for NumberLiteral
Source§impl<'de> Deserialize<'de> for NumberLiteral
impl<'de> Deserialize<'de> for NumberLiteral
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 NumberLiteral
impl RefUnwindSafe for NumberLiteral
impl Send for NumberLiteral
impl Sync for NumberLiteral
impl Unpin for NumberLiteral
impl UnwindSafe for NumberLiteral
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