pub struct SyncFallbackTool { /* private fields */ }Expand description
Fallback impl for providers without a dedicated streaming adapter
in 34.d’s scope (http / mcp / unknown). The stream() method
emits a single error-terminator chunk indicating that the
provider’s streaming surface lands in a later sub-fase
(Fase 34.e for HTTP, Fase 34.f for MCP).
This is a HONEST fallback — it does NOT silently coerce a
streaming declaration into a synchronous call. Adopters who
declare a stream effect on an HTTP/MCP tool today see a clear
ToolFinishReason::Error { message: "streaming adapter not yet implemented for provider 'http' — pending Fase 34.e" }
terminator chunk. After 34.e/f, the bridge’s match arms
route these providers to their dedicated streaming impls.
Implementations§
Trait Implementations§
Source§impl Tool for SyncFallbackTool
impl Tool for SyncFallbackTool
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
_args: String,
_ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
_args: String,
_ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool synchronously. Returns a single materialized
ToolResult. EVERY tool MUST implement this method
(no default — there’s no sensible default execute).Source§fn stream<'life0, 'async_trait>(
&'life0 self,
args: String,
ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = ToolStream> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream<'life0, 'async_trait>(
&'life0 self,
args: String,
ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = ToolStream> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn is_streaming(&self) -> bool
fn is_streaming(&self) -> bool
Whether this tool is a stream producer. Default:
false. Read moreAuto Trait Implementations§
impl Freeze for SyncFallbackTool
impl RefUnwindSafe for SyncFallbackTool
impl Send for SyncFallbackTool
impl Sync for SyncFallbackTool
impl Unpin for SyncFallbackTool
impl UnsafeUnpin for SyncFallbackTool
impl UnwindSafe for SyncFallbackTool
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
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 moreCreates a shared type from an unshared type.