pub struct SchemaField {
pub type: FieldType,
pub required: Option<bool>,
pub uri: Option<String>,
pub pattern: Option<String>,
pub enum: Option<Vec<Value>>,
pub properties: Option<HashMap<String, SchemaField>>,
pub items: Option<Box<SchemaField>>,
pub description: Option<String>,
}Expand description
Schema field definition
Fields§
§type: FieldTypeField type
required: Option<bool>Whether the field is required
uri: Option<String>For ref types, the URI with optional version operators
pattern: Option<String>Pattern for string validation
enum: Option<Vec<Value>>Enumeration of allowed values
properties: Option<HashMap<String, SchemaField>>For objects, property definitions
items: Option<Box<SchemaField>>For arrays, item schema
description: Option<String>Field description
Trait Implementations§
Source§impl Clone for SchemaField
impl Clone for SchemaField
Source§fn clone(&self) -> SchemaField
fn clone(&self) -> SchemaField
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 SchemaField
impl Debug for SchemaField
Source§impl<'de> Deserialize<'de> for SchemaField
impl<'de> Deserialize<'de> for SchemaField
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 SchemaField
impl RefUnwindSafe for SchemaField
impl Send for SchemaField
impl Sync for SchemaField
impl Unpin for SchemaField
impl UnwindSafe for SchemaField
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