Skip to main content

Adapter

Trait Adapter 

Source
pub trait Adapter {
    // Required method
    fn adapt(&self) -> Result<AdaptedApi>;
}
Expand description

Converts a source contract into Poolster’s target-neutral AST.

Implement this trait in an application or integration crate to support formats such as AsyncAPI, GraphQL, or a company-specific contract format. It is deliberately synchronous and object-safe, so adapters can be passed as &dyn Adapter when a caller selects an input format at runtime.

Output customization does not use a separate parser trait: it belongs to Poolster’s existing crate::engine::Language and crate::engine::Plugin extension points after an adapter has produced an Api.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§