Skip to main content

Adapter

Trait Adapter 

Source
pub trait Adapter {
    // Required methods
    fn name(&self) -> &'static str;
    fn run(&self) -> Result<()>;
}
Expand description

One trait, three impls (shim, hook, MCP). Each normalizes a source and runs.

Required Methods§

Source

fn name(&self) -> &'static str

Stable name of the adapter, e.g. "shim", "claude-code", "mcp".

Source

fn run(&self) -> Result<()>

Run the adapter. Long-running for hook/MCP servers; one-shot for the shim.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§