Skip to main content

MiddlewareStage

Trait MiddlewareStage 

Source
pub trait MiddlewareStage:
    Sealed
    + Send
    + Sync {
    type Context: Send + 'static;
    type Result: Send + 'static;

    const NAME: &'static str;
}
Expand description

A middleware interception point (MiddlewareStage), sealed to the SDK’s stages: InvokeModelStage and ExecuteToolStage.

Required Associated Constants§

Source

const NAME: &'static str

The stage name (invokeModel, executeTool).

Required Associated Types§

Source

type Context: Send + 'static

What handlers receive and pass to next.

Source

type Result: Send + 'static

What the stage produces.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§