Skip to main content

Callable

Trait Callable 

Source
pub trait Callable:
    Send
    + Sync
    + 'static {
    // Required method
    fn call<'life0, 'async_trait>(
        &'life0 self,
        input: Value,
        ctx: CallCtx,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn label(&self) -> &str { ... }
}
Expand description

Anything an agent / workflow / harness can call. Implemented by every executable unit so they’re interchangeable as workflow steps, tool invocations, and team routing targets.

Required Methods§

Source

fn call<'life0, 'async_trait>( &'life0 self, input: Value, ctx: CallCtx, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn label(&self) -> &str

Human-readable label for telemetry. Default falls back to the type name.

Implementors§

Source§

impl Callable for Branch

Source§

impl Callable for WithConfig

Source§

impl Callable for WithFallbacks

Source§

impl Callable for WithRetry

Source§

impl Callable for WithTimeout

Source§

impl<F, Fut> Callable for FnCallable<F>
where F: Fn(Value, CallCtx) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Value>> + Send + 'static,