pub struct JsonSchemaVariant {
pub discriminant: Option<String>,
pub map: Option<Vec<JsonSchemaVariantMap>>,
}Expand description
In a variant data type, the value of one property is used to determine how to interpret the entire entity. Its value must exist in a map of descriminant values to schema names.
This type is not used in any activity, and only used as part of another schema.
Fields§
§discriminant: Option<String>The name of the type discriminant property.
map: Option<Vec<JsonSchemaVariantMap>>The map of discriminant value to schema to use for parsing..
Trait Implementations§
Source§impl Clone for JsonSchemaVariant
impl Clone for JsonSchemaVariant
Source§fn clone(&self) -> JsonSchemaVariant
fn clone(&self) -> JsonSchemaVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 JsonSchemaVariant
impl Debug for JsonSchemaVariant
Source§impl Default for JsonSchemaVariant
impl Default for JsonSchemaVariant
Source§fn default() -> JsonSchemaVariant
fn default() -> JsonSchemaVariant
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for JsonSchemaVariant
impl<'de> Deserialize<'de> for JsonSchemaVariant
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 NestedType for JsonSchemaVariant
impl Part for JsonSchemaVariant
Auto Trait Implementations§
impl Freeze for JsonSchemaVariant
impl RefUnwindSafe for JsonSchemaVariant
impl Send for JsonSchemaVariant
impl Sync for JsonSchemaVariant
impl Unpin for JsonSchemaVariant
impl UnsafeUnpin for JsonSchemaVariant
impl UnwindSafe for JsonSchemaVariant
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