pub struct SchemaPropertyConstraints {
pub pattern: Option<String>,
pub minimum: Option<Number>,
pub maximum: Option<Number>,
pub min_length: Option<u64>,
pub max_length: Option<u64>,
pub min_items: Option<u64>,
pub max_items: Option<u64>,
pub format: Option<String>,
pub unique_items: Option<bool>,
pub additional: BTreeMap<String, Value>,
}Expand description
The scalar constraints a single top-level property states about its own
value: pattern, numeric bounds, length and item-count bounds, format, and
uniqueItems.
minimum/maximum keep the JSON number as a serde_json::Number, so an
integral bound stays an integer and a decimal or exponent bound keeps its
precision. Length and item bounds are non-negative integers and use u64.
Unknown fields are preserved in Self::additional.
Fields§
§pattern: Option<String>§minimum: Option<Number>§maximum: Option<Number>§min_length: Option<u64>§max_length: Option<u64>§min_items: Option<u64>§max_items: Option<u64>§format: Option<String>§unique_items: Option<bool>§additional: BTreeMap<String, Value>Trait Implementations§
Source§impl Clone for SchemaPropertyConstraints
impl Clone for SchemaPropertyConstraints
Source§impl Debug for SchemaPropertyConstraints
impl Debug for SchemaPropertyConstraints
Source§impl Default for SchemaPropertyConstraints
impl Default for SchemaPropertyConstraints
Source§impl<'de> Deserialize<'de> for SchemaPropertyConstraints
impl<'de> Deserialize<'de> for SchemaPropertyConstraints
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 SchemaPropertyConstraints
impl RefUnwindSafe for SchemaPropertyConstraints
impl Send for SchemaPropertyConstraints
impl Sync for SchemaPropertyConstraints
impl Unpin for SchemaPropertyConstraints
impl UnsafeUnpin for SchemaPropertyConstraints
impl UnwindSafe for SchemaPropertyConstraints
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