pub struct ElicitationSchema {
pub schema_type: String,
pub properties: HashMap<String, PrimitiveSchemaDefinition>,
pub required: Option<Vec<String>>,
}
Expand description
Elicitation schema - restricted subset of JSON Schema for primitive types only
Fields§
§schema_type: String
Schema type (must be “object”)
properties: HashMap<String, PrimitiveSchemaDefinition>
Schema properties (field definitions)
required: Option<Vec<String>>
Required field names
Implementations§
Source§impl ElicitationSchema
impl ElicitationSchema
Sourcepub fn add_string_property<K: Into<String>>(
self,
name: K,
required: bool,
description: Option<String>,
) -> Self
pub fn add_string_property<K: Into<String>>( self, name: K, required: bool, description: Option<String>, ) -> Self
Add a string property
Sourcepub fn add_number_property<K: Into<String>>(
self,
name: K,
required: bool,
description: Option<String>,
min: Option<f64>,
max: Option<f64>,
) -> Self
pub fn add_number_property<K: Into<String>>( self, name: K, required: bool, description: Option<String>, min: Option<f64>, max: Option<f64>, ) -> Self
Add a number property
Trait Implementations§
Source§impl Clone for ElicitationSchema
impl Clone for ElicitationSchema
Source§fn clone(&self) -> ElicitationSchema
fn clone(&self) -> ElicitationSchema
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 ElicitationSchema
impl Debug for ElicitationSchema
Source§impl Default for ElicitationSchema
impl Default for ElicitationSchema
Source§impl<'de> Deserialize<'de> for ElicitationSchema
impl<'de> Deserialize<'de> for ElicitationSchema
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 PartialEq for ElicitationSchema
impl PartialEq for ElicitationSchema
Source§impl Serialize for ElicitationSchema
impl Serialize for ElicitationSchema
impl StructuralPartialEq for ElicitationSchema
Auto Trait Implementations§
impl Freeze for ElicitationSchema
impl RefUnwindSafe for ElicitationSchema
impl Send for ElicitationSchema
impl Sync for ElicitationSchema
impl Unpin for ElicitationSchema
impl UnwindSafe for ElicitationSchema
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