#[non_exhaustive]pub enum AvailableCommand {
Command(Command),
Other(OtherAvailableCommand),
}unstable_protocol_v2 only.Expand description
A command the agent advertises to the client.
The type field acts as the discriminator in the serialized JSON form.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Command(Command)
A slash command the user can invoke by including it in a prompt.
Other(OtherAvailableCommand)
Custom or future command kind.
Values beginning with _ are reserved for implementation-specific
extensions. Unknown values that do not begin with _ are reserved for
future ACP variants.
Clients that do not understand this command type should preserve the raw
payload when storing, replaying, proxying, or forwarding command
metadata, and otherwise ignore the command or display it as a plain
command using its name and description.
Implementations§
Source§impl AvailableCommand
impl AvailableCommand
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Human-readable description of what the command does.
Sourcepub fn meta(&self) -> Option<&Meta>
pub fn meta(&self) -> Option<&Meta>
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for AvailableCommand
impl Clone for AvailableCommand
Source§impl Debug for AvailableCommand
impl Debug for AvailableCommand
Source§impl<'de> Deserialize<'de> for AvailableCommand
impl<'de> Deserialize<'de> for AvailableCommand
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>,
impl Eq for AvailableCommand
Source§impl JsonSchema for AvailableCommand
Available on crate feature schemars only.
impl JsonSchema for AvailableCommand
schemars only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AvailableCommand
impl PartialEq for AvailableCommand
Source§impl Serialize for AvailableCommand
impl Serialize for AvailableCommand
impl StructuralPartialEq for AvailableCommand
Auto Trait Implementations§
impl Freeze for AvailableCommand
impl RefUnwindSafe for AvailableCommand
impl Send for AvailableCommand
impl Sync for AvailableCommand
impl Unpin for AvailableCommand
impl UnsafeUnpin for AvailableCommand
impl UnwindSafe for AvailableCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.