pub struct UntitledSingleSelectEnumSchema {
pub default: Option<String>,
pub description: Option<String>,
pub enum_: Vec<String>,
pub title: Option<String>,
/* private fields */
}Expand description
Schema for single-selection enumeration without display titles for options.
JSON schema
{
"description": "Schema for single-selection enumeration without display titles for options.",
"type": "object",
"required": [
"enum",
"type"
],
"properties": {
"default": {
"description": "Optional default value.",
"type": "string"
},
"description": {
"description": "Optional description for the enum field.",
"type": "string"
},
"enum": {
"description": "Array of enum values to choose from.",
"type": "array",
"items": {
"type": "string"
}
},
"title": {
"description": "Optional title for the enum field.",
"type": "string"
},
"type": {
"type": "string",
"const": "string"
}
}
}Fields§
§default: Option<String>Optional default value.
description: Option<String>Optional description for the enum field.
enum_: Vec<String>Array of enum values to choose from.
title: Option<String>Optional title for the enum field.
Implementations§
Source§impl UntitledSingleSelectEnumSchema
impl UntitledSingleSelectEnumSchema
pub fn new( enum_: Vec<String>, default: Option<String>, description: Option<String>, title: Option<String>, ) -> Self
pub fn type_(&self) -> &String
Sourcepub fn type_value() -> &'static str
pub fn type_value() -> &'static str
returns “string”
pub fn type_name() -> &'static str
👎Deprecated since 0.8.0: Use
type_value() instead.Trait Implementations§
Source§impl Clone for UntitledSingleSelectEnumSchema
impl Clone for UntitledSingleSelectEnumSchema
Source§fn clone(&self) -> UntitledSingleSelectEnumSchema
fn clone(&self) -> UntitledSingleSelectEnumSchema
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<'de> Deserialize<'de> for UntitledSingleSelectEnumSchema
impl<'de> Deserialize<'de> for UntitledSingleSelectEnumSchema
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
Source§impl From<UntitledSingleSelectEnumSchema> for EnumSchema
impl From<UntitledSingleSelectEnumSchema> for EnumSchema
Source§fn from(value: UntitledSingleSelectEnumSchema) -> Self
fn from(value: UntitledSingleSelectEnumSchema) -> Self
Converts to this type from the input type.
Source§impl From<UntitledSingleSelectEnumSchema> for PrimitiveSchemaDefinition
impl From<UntitledSingleSelectEnumSchema> for PrimitiveSchemaDefinition
Source§fn from(value: UntitledSingleSelectEnumSchema) -> Self
fn from(value: UntitledSingleSelectEnumSchema) -> Self
Converts to this type from the input type.
Source§impl From<UntitledSingleSelectEnumSchema> for SingleSelectEnumSchema
impl From<UntitledSingleSelectEnumSchema> for SingleSelectEnumSchema
Source§fn from(value: UntitledSingleSelectEnumSchema) -> Self
fn from(value: UntitledSingleSelectEnumSchema) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UntitledSingleSelectEnumSchema
impl RefUnwindSafe for UntitledSingleSelectEnumSchema
impl Send for UntitledSingleSelectEnumSchema
impl Sync for UntitledSingleSelectEnumSchema
impl Unpin for UntitledSingleSelectEnumSchema
impl UnwindSafe for UntitledSingleSelectEnumSchema
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