pub struct CommandDescriptor {
pub name: String,
pub display_name: String,
pub description: String,
pub payload_template: String,
pub parameters: Vec<ParameterDefinition>,
pub fixed_values: HashMap<String, Value>,
pub samples: Vec<Value>,
pub parameter_groups: Vec<ParameterGroup>,
}Expand description
Command definition/descriptor.
Fields§
§name: StringCommand name (used as identifier)
display_name: StringHuman-readable display name
description: StringDescription for documentation and LLM hints
payload_template: StringPayload template (optional)
parameters: Vec<ParameterDefinition>Command parameters
fixed_values: HashMap<String, Value>Fixed values to inject
samples: Vec<Value>Sample payloads for documentation
parameter_groups: Vec<ParameterGroup>Parameter groups
Implementations§
Source§impl CommandDescriptor
impl CommandDescriptor
Sourcepub fn with_display_name(self, display_name: impl Into<String>) -> Self
pub fn with_display_name(self, display_name: impl Into<String>) -> Self
Add display name.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Add description.
Sourcepub fn param(self, param: ParameterDefinition) -> Self
pub fn param(self, param: ParameterDefinition) -> Self
Add a parameter.
Trait Implementations§
Source§impl Clone for CommandDescriptor
impl Clone for CommandDescriptor
Source§fn clone(&self) -> CommandDescriptor
fn clone(&self) -> CommandDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandDescriptor
impl Debug for CommandDescriptor
Source§impl Default for CommandDescriptor
impl Default for CommandDescriptor
Source§fn default() -> CommandDescriptor
fn default() -> CommandDescriptor
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CommandDescriptor
impl<'de> Deserialize<'de> for CommandDescriptor
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<SdkCommandDefinition> for CommandDescriptor
impl From<SdkCommandDefinition> for CommandDescriptor
Source§fn from(c: SdkCommandDefinition) -> Self
fn from(c: SdkCommandDefinition) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CommandDescriptor
impl RefUnwindSafe for CommandDescriptor
impl Send for CommandDescriptor
impl Sync for CommandDescriptor
impl Unpin for CommandDescriptor
impl UnsafeUnpin for CommandDescriptor
impl UnwindSafe for CommandDescriptor
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