pub struct SchemaObject {Show 13 fields
pub schema_type: Option<String>,
pub format: Option<String>,
pub properties: Option<HashMap<String, SchemaObject>>,
pub items: Option<Box<SchemaObject>>,
pub required: Option<Vec<String>>,
pub description: Option<String>,
pub example: Option<Value>,
pub nullable: bool,
pub deprecated: bool,
pub enum_values: Option<Vec<Value>>,
pub default: Option<Value>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
}Fields§
§schema_type: Option<String>§format: Option<String>§properties: Option<HashMap<String, SchemaObject>>§items: Option<Box<SchemaObject>>§required: Option<Vec<String>>§description: Option<String>§example: Option<Value>§nullable: bool§deprecated: bool§enum_values: Option<Vec<Value>>§default: Option<Value>§minimum: Option<f64>§maximum: Option<f64>Implementations§
Source§impl SchemaObject
impl SchemaObject
pub fn string() -> SchemaObject
pub fn integer() -> SchemaObject
pub fn number() -> SchemaObject
pub fn boolean() -> SchemaObject
pub fn array(items: SchemaObject) -> SchemaObject
pub fn object(properties: HashMap<String, SchemaObject>) -> SchemaObject
pub fn with_example(self, example: Value) -> SchemaObject
pub fn with_description(self, description: &str) -> SchemaObject
pub fn with_format(self, format: &str) -> SchemaObject
Trait Implementations§
Source§impl Clone for SchemaObject
impl Clone for SchemaObject
Source§fn clone(&self) -> SchemaObject
fn clone(&self) -> SchemaObject
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 SchemaObject
impl Debug for SchemaObject
Source§impl Default for SchemaObject
impl Default for SchemaObject
Source§fn default() -> SchemaObject
fn default() -> SchemaObject
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SchemaObject
impl<'de> Deserialize<'de> for SchemaObject
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaObject, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SchemaObject, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SchemaObject
impl Serialize for SchemaObject
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SchemaObject
impl RefUnwindSafe for SchemaObject
impl Send for SchemaObject
impl Sync for SchemaObject
impl Unpin for SchemaObject
impl UnsafeUnpin for SchemaObject
impl UnwindSafe for SchemaObject
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