pub struct AgentExtension {
pub uri: String,
pub description: Option<String>,
pub required: Option<bool>,
pub params: Option<Value>,
}Expand description
Describes an optional extension that an agent supports.
Extensions are identified by a URI and may carry an arbitrary JSON parameter block understood by the extension spec.
Fields§
§uri: StringUnique URI identifying the extension (e.g. "https://example.com/ext/v1").
description: Option<String>Human-readable description of the extension’s purpose.
required: Option<bool>Whether clients must support this extension to interact correctly.
A value of true means the agent cannot operate meaningfully without
the client understanding this extension.
params: Option<Value>Extension-specific parameters; structure is defined by the extension URI.
Implementations§
Source§impl AgentExtension
impl AgentExtension
Sourcepub fn new(uri: impl Into<String>) -> AgentExtension
pub fn new(uri: impl Into<String>) -> AgentExtension
Creates a minimal AgentExtension with only a URI.
Trait Implementations§
Source§impl Clone for AgentExtension
impl Clone for AgentExtension
Source§fn clone(&self) -> AgentExtension
fn clone(&self) -> AgentExtension
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 AgentExtension
impl Debug for AgentExtension
Source§impl<'de> Deserialize<'de> for AgentExtension
impl<'de> Deserialize<'de> for AgentExtension
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentExtension, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentExtension, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AgentExtension
impl Serialize for AgentExtension
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AgentExtension
impl RefUnwindSafe for AgentExtension
impl Send for AgentExtension
impl Sync for AgentExtension
impl Unpin for AgentExtension
impl UnsafeUnpin for AgentExtension
impl UnwindSafe for AgentExtension
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