#[non_exhaustive]pub struct Schema {Show 23 fields
pub type_: SchemaType,
pub format: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
pub nullable: Option<bool>,
pub enum: Option<Vec<String>>,
pub max_items: Option<String>,
pub min_items: Option<String>,
pub properties: Option<BTreeMap<String, Box<Schema>>>,
pub required: Option<Vec<String>>,
pub min_properties: Option<String>,
pub max_properties: Option<String>,
pub min_length: Option<String>,
pub max_length: Option<String>,
pub pattern: Option<String>,
pub example: Option<Value>,
pub any_of: Option<Vec<Box<Schema>>>,
pub property_ordering: Option<Vec<String>>,
pub default: Option<Value>,
pub items: Option<Box<Schema>>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub rest: Rest,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type_: SchemaType§format: Option<String>§title: Option<String>§description: Option<String>§nullable: Option<bool>§enum: Option<Vec<String>>§max_items: Option<String>§min_items: Option<String>§properties: Option<BTreeMap<String, Box<Schema>>>§required: Option<Vec<String>>§min_properties: Option<String>§max_properties: Option<String>§min_length: Option<String>§max_length: Option<String>§pattern: Option<String>§example: Option<Value>§any_of: Option<Vec<Box<Schema>>>§property_ordering: Option<Vec<String>>§default: Option<Value>§items: Option<Box<Schema>>§minimum: Option<f64>§maximum: Option<f64>§rest: RestImplementations§
Source§impl Schema
impl Schema
Sourcepub fn builder(type_: SchemaType) -> SchemaBuilder
pub fn builder(type_: SchemaType) -> SchemaBuilder
Start a builder by supplying the required fields in declaration order.
Trait Implementations§
Source§impl DeclaredFields for Schema
impl DeclaredFields for Schema
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
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
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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