Skip to main content

TypeRenderer

Trait TypeRenderer 

Source
pub trait TypeRenderer {
    // Required method
    fn render(&self, ty: &UnifiedType) -> String;
}
Expand description

Trait for rendering a UnifiedType into a language-specific string.

Each language backend provides a concrete impl. The four existing free functions (unified_to_rust, unified_to_python_type, unified_to_napi, unified_to_typescript) are kept as thin wrappers so call-sites don’t change.

Required Methods§

Source

fn render(&self, ty: &UnifiedType) -> String

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§