pub struct ElicitFormSchema {
pub schema_type: String,
pub properties: HashMap<String, PrimitiveSchemaDefinition>,
pub required: Vec<String>,
}Expand description
Restricted JSON Schema for elicitation forms
Only allows top-level properties with primitive types.
Fields§
§schema_type: StringMust be “object”
properties: HashMap<String, PrimitiveSchemaDefinition>Map of property names to their schema definitions
required: Vec<String>List of required property names
Implementations§
Source§impl ElicitFormSchema
impl ElicitFormSchema
Sourcepub fn string_field(
self,
name: &str,
description: Option<&str>,
required: bool,
) -> Self
pub fn string_field( self, name: &str, description: Option<&str>, required: bool, ) -> Self
Add a string field
Sourcepub fn number_field(
self,
name: &str,
description: Option<&str>,
required: bool,
) -> Self
pub fn number_field( self, name: &str, description: Option<&str>, required: bool, ) -> Self
Add a number field
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 Default for ElicitFormSchema
impl Default 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