pub trait Converter:
Debug
+ Clone
+ Sized
+ Send
+ Sync
+ 'static {
type OpenApiType: ToOpenApi + Debug + Send + Sync;
type TargetType: Display + Debug + Send + Sync;
// Required methods
fn convert(
&self,
src: Self::OpenApiType,
) -> Result<Output<Self::TargetType>>;
fn format_code(&self, path: &Path) -> Result<String>;
}Expand description
Convert OpenAPI definitions to target type.
Required Associated Types§
Required Methods§
Sourcefn convert(&self, src: Self::OpenApiType) -> Result<Output<Self::TargetType>>
fn convert(&self, src: Self::OpenApiType) -> Result<Output<Self::TargetType>>
Convert the given OpenAPI type to the target type.
Sourcefn format_code(&self, path: &Path) -> Result<String>
fn format_code(&self, path: &Path) -> Result<String>
Format the code in the given path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.