pub struct NumberSchema {
pub schema_type: String,
pub title: Option<String>,
pub description: Option<String>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
}
Expand description
Number schema definition (supports both number and integer)
Fields§
§schema_type: String
Type discriminator (“number” or “integer”)
title: Option<String>
Display title
description: Option<String>
Description
minimum: Option<f64>
Minimum value
maximum: Option<f64>
Maximum value
Implementations§
Source§impl NumberSchema
impl NumberSchema
Sourcepub fn new_number() -> Self
pub fn new_number() -> Self
Create a new number schema for floating point numbers
Sourcepub fn new_integer() -> Self
pub fn new_integer() -> Self
Create a new number schema for integers
Trait Implementations§
Source§impl Clone for NumberSchema
impl Clone for NumberSchema
Source§fn clone(&self) -> NumberSchema
fn clone(&self) -> NumberSchema
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 NumberSchema
impl Debug for NumberSchema
Source§impl<'de> Deserialize<'de> for NumberSchema
impl<'de> Deserialize<'de> for NumberSchema
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 NumberSchema
impl RefUnwindSafe for NumberSchema
impl Send for NumberSchema
impl Sync for NumberSchema
impl Unpin for NumberSchema
impl UnwindSafe for NumberSchema
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