Skip to main content

Component

Trait Component 

Source
pub trait Component: EvalSite {
    // Required methods
    fn kind(&self) -> ComponentKind;
    fn name(&self) -> &Symbol;
    fn capabilities(&self) -> &[CapabilityName];
    fn reflect(&self, cx: &mut Cx) -> Result<Expr>;
}
Expand description

A pluggable agent building block (runner, tool, memory, planner, and so on) that participates in evaluation as an EvalSite.

Required Methods§

Source

fn kind(&self) -> ComponentKind

Returns the kind of component this is.

Source

fn name(&self) -> &Symbol

Returns the component’s name symbol.

Source

fn capabilities(&self) -> &[CapabilityName]

Returns the capabilities this component requires or grants.

Source

fn reflect(&self, cx: &mut Cx) -> Result<Expr>

Produces a self-describing expression for inspection of this component.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§