pub struct ElicitFormSchema {
pub properties: HashMap<String, PrimitiveSchemaDefinition>,
pub required: Vec<String>,
pub schema: Option<String>,
/* private fields */
}Expand description
A restricted subset of JSON Schema. Only top-level properties are allowed, without nesting.
JSON schema
{
"description": "A restricted subset of JSON Schema.\nOnly top-level properties are allowed, without nesting.",
"type": "object",
"required": [
"properties",
"type"
],
"properties": {
"$schema": {
"type": "string"
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/PrimitiveSchemaDefinition"
}
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "object"
}
}
}Fields§
§properties: HashMap<String, PrimitiveSchemaDefinition>§required: Vec<String>§schema: Option<String>Implementations§
Source§impl ElicitFormSchema
impl ElicitFormSchema
pub fn new( properties: HashMap<String, PrimitiveSchemaDefinition>, required: Vec<String>, schema: Option<String>, ) -> Self
pub fn type_(&self) -> &String
Sourcepub fn type_value() -> String
pub fn type_value() -> String
returns “object”
pub fn type_name() -> String
👎Deprecated since 0.8.0: Use
type_value() instead.Trait Implementations§
Source§impl Clone for ElicitFormSchema
impl Clone for ElicitFormSchema
Source§fn clone(&self) -> ElicitFormSchema
fn clone(&self) -> ElicitFormSchema
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 ElicitFormSchema
impl Debug for ElicitFormSchema
Source§impl<'de> Deserialize<'de> for ElicitFormSchema
impl<'de> Deserialize<'de> for ElicitFormSchema
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 ElicitFormSchema
impl RefUnwindSafe for ElicitFormSchema
impl Send for ElicitFormSchema
impl Sync for ElicitFormSchema
impl Unpin for ElicitFormSchema
impl UnwindSafe for ElicitFormSchema
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