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., “sample_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.
a streaming crate 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 moreSource§impl Debug for AdapterConfig
impl Debug for AdapterConfig
Source§impl<'de> Deserialize<'de> for AdapterConfig
impl<'de> Deserialize<'de> for AdapterConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AdapterConfig
impl JsonSchema for AdapterConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for AdapterConfig
impl RefUnwindSafe for AdapterConfig
impl Send for AdapterConfig
impl Sync for AdapterConfig
impl Unpin for AdapterConfig
impl UnsafeUnpin for AdapterConfig
impl UnwindSafe for AdapterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more