pub struct ToolProvider { /* private fields */ }Expand description
The generated tool-provider guest — the always-present surface of every ACT component.
Implementations§
Source§impl Guest
impl Guest
pub fn func_list_tools( &self, ) -> TypedFunc<(Metadata,), (Result<ListToolsResponse, Error>,)>
Sourcepub async fn call_list_tools<_T, _D>(
&self,
accessor: &Accessor<_T, _D>,
arg0: Metadata,
) -> Result<Result<ListToolsResponse, Error>>
pub async fn call_list_tools<_T, _D>( &self, accessor: &Accessor<_T, _D>, arg0: Metadata, ) -> Result<Result<ListToolsResponse, Error>>
Returns the list of tools available for the given metadata. Async because some components produce dynamic catalogs.
pub fn func_call_tool( &self, ) -> TypedFunc<(String, Cbor, Metadata), (ToolResult,)>
Sourcepub async fn call_call_tool<_T, _D>(
&self,
accessor: &Accessor<_T, _D>,
arg0: String,
arg1: Cbor,
arg2: Metadata,
) -> Result<ToolResult>
pub async fn call_call_tool<_T, _D>( &self, accessor: &Accessor<_T, _D>, arg0: String, arg1: Cbor, arg2: Metadata, ) -> Result<ToolResult>
Invokes a tool by name.
name— tool name, as returned bylist-tools.arguments— deterministically Encoded CBOR arguments (RFC 8949 §4.2), validated by the host against the tool’sparameters-schemabefore being passed to the component.metadata— per-call metadata.
Returns either immediate (bounded, sync-friendly) or streaming
(unbounded or incremental). Both carry tool-events with the same
semantics: tool-event::error is terminal.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Guest
impl RefUnwindSafe for Guest
impl Send for Guest
impl Sync for Guest
impl Unpin for Guest
impl UnsafeUnpin for Guest
impl UnwindSafe for Guest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.