pub struct AdapterConfig {Show 14 fields
pub name: String,
pub pattern: AdapterPattern,
pub core_path: String,
pub params: Vec<AdapterParam>,
pub returns: Option<String>,
pub error_type: Option<String>,
pub owner_type: Option<String>,
pub item_type: Option<String>,
pub gil_release: bool,
pub trait_name: Option<String>,
pub trait_method: Option<String>,
pub detect_async: bool,
pub request_type: Option<String>,
pub skip_languages: Vec<String>,
}Expand description
Configuration for a single adapter.
Fields§
§name: String§pattern: AdapterPattern§core_path: StringFull Rust path to the core function/method (e.g., “html_to_markdown_rs::convert”)
params: Vec<AdapterParam>Parameters
returns: Option<String>Return type name
error_type: Option<String>Error type name
owner_type: Option<String>For async_method/streaming: the owning type name
item_type: Option<String>For streaming: the item type
gil_release: boolFor Python: release GIL during call
trait_name: Option<String>For callback_bridge: the Rust trait to implement (e.g., “MyHandler”)
trait_method: Option<String>For callback_bridge: the trait method name (e.g., “handle”)
detect_async: boolFor callback_bridge: whether to detect async callbacks at construction time
request_type: Option<String>For streaming (FFI backend): full Rust type path of the request payload
deserialised from JSON (e.g. "my_crate::ChatCompletionRequest").
Required when generating FFI streaming bodies — codegen will hard-fail
with a clear error if this field is absent on a streaming adapter.
skip_languages: Vec<String>Language backends for which this adapter should NOT be emitted.
Mirrors the same field on [[crates.e2e.calls.*]]. Useful when a
consumer’s core crate cannot compile on a given target (e.g.
kreuzcrawl on wasm32-unknown-unknown which has no working async
runtime for streaming). The adapter remains declared for every backend
where it works, with explicit per-backend opt-out rather than removing
the adapter entirely.
Values must match the canonical TOML language names used in languages
("python", "node", "wasm", "ruby", "php", "go",
"java", "csharp", "elixir", "kotlin", "kotlin_android",
"swift", "dart", "zig", "ffi", "r", "gleam", "c",
"jni", "rust"). An unknown name fails at config-resolve time.
Example: skip_languages = ["wasm", "kotlin"]
Trait Implementations§
Source§impl Clone for AdapterConfig
impl Clone for AdapterConfig
Source§fn clone(&self) -> AdapterConfig
fn clone(&self) -> AdapterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more