pub struct ToolAgentSurface {
pub module_path: Vec<String>,
pub operation: Option<String>,
pub authority_type: Option<String>,
pub aliases: Vec<String>,
}Fields§
§module_path: Vec<String>§operation: Option<String>§aliases: Vec<String>Implementations§
Source§impl ToolAgentSurface
impl ToolAgentSurface
pub fn new( module_path: impl IntoIterator<Item = impl Into<String>>, operation: impl Into<String>, ) -> ToolAgentSurface
pub fn with_aliases( self, aliases: impl IntoIterator<Item = impl Into<String>>, ) -> ToolAgentSurface
pub fn executable_for(&self, tool_name: &str) -> ToolAgentExecutableSurface
Sourcepub fn required_for_remote(
manifest: &ToolManifest,
) -> Result<ToolAgentExecutableSurface, String>
pub fn required_for_remote( manifest: &ToolManifest, ) -> Result<ToolAgentExecutableSurface, String>
Resolve a remote-callable surface without applying local prompt fallbacks.
Remote hosts must provide an explicit module path and operation so
serialized tool grants have one canonical call path. This deliberately
rejects the prompt-only conveniences used by Self::executable_for,
where an empty module path falls back to tools and an empty operation
falls back to the flat tool name.
pub fn required_executable_for_remote( &self, tool_name: &str, ) -> Result<ToolAgentExecutableSurface, String>
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ToolAgentSurface
impl Clone for ToolAgentSurface
Source§fn clone(&self) -> ToolAgentSurface
fn clone(&self) -> ToolAgentSurface
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 ToolAgentSurface
impl Debug for ToolAgentSurface
Source§impl Default for ToolAgentSurface
impl Default for ToolAgentSurface
Source§fn default() -> ToolAgentSurface
fn default() -> ToolAgentSurface
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolAgentSurface
impl<'de> Deserialize<'de> for ToolAgentSurface
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolAgentSurface, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolAgentSurface, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ToolAgentSurface
Source§impl PartialEq for ToolAgentSurface
impl PartialEq for ToolAgentSurface
Source§fn eq(&self, other: &ToolAgentSurface) -> bool
fn eq(&self, other: &ToolAgentSurface) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolAgentSurface
impl Serialize for ToolAgentSurface
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
impl StructuralPartialEq for ToolAgentSurface
Auto Trait Implementations§
impl Freeze for ToolAgentSurface
impl RefUnwindSafe for ToolAgentSurface
impl Send for ToolAgentSurface
impl Sync for ToolAgentSurface
impl Unpin for ToolAgentSurface
impl UnsafeUnpin for ToolAgentSurface
impl UnwindSafe for ToolAgentSurface
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