pub struct FunctionParameters {
pub param_type: String,
pub properties: Option<HashMap<String, PropertyDetails>>,
pub required: Option<Vec<String>>,
}
Expand description
Parameters for a function
Fields§
§param_type: String
The type of the parameters
properties: Option<HashMap<String, PropertyDetails>>
The properties of the parameters
required: Option<Vec<String>>
The required properties
Implementations§
Source§impl FunctionParameters
impl FunctionParameters
Sourcepub fn with_property(
self,
name: impl Into<String>,
details: PropertyDetails,
required: bool,
) -> Self
pub fn with_property( self, name: impl Into<String>, details: PropertyDetails, required: bool, ) -> Self
Add a property to the parameters
Trait Implementations§
Source§impl Clone for FunctionParameters
impl Clone for FunctionParameters
Source§fn clone(&self) -> FunctionParameters
fn clone(&self) -> FunctionParameters
Returns a copy 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 FunctionParameters
impl Debug for FunctionParameters
Source§impl<'de> Deserialize<'de> for FunctionParameters
impl<'de> Deserialize<'de> for FunctionParameters
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 FunctionParameters
impl RefUnwindSafe for FunctionParameters
impl Send for FunctionParameters
impl Sync for FunctionParameters
impl Unpin for FunctionParameters
impl UnwindSafe for FunctionParameters
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