pub trait ExportLanguage {
// Required methods
fn globals() -> String;
fn render_functions(
function_types: Vec<FunctionDataType>,
cfg: &ExportConfiguration,
) -> Result<String, TsExportError>;
fn render(
function_types: Vec<FunctionDataType>,
type_map: TypeDefs,
cfg: &ExportConfiguration,
) -> Result<String, TsExportError>;
}Expand description
A set of functions that produce language-specific code
Required Methods§
Sourcefn render_functions(
function_types: Vec<FunctionDataType>,
cfg: &ExportConfiguration,
) -> Result<String, TsExportError>
fn render_functions( function_types: Vec<FunctionDataType>, cfg: &ExportConfiguration, ) -> Result<String, TsExportError>
Renders a collection of FunctionDataType into a string.
Sourcefn render(
function_types: Vec<FunctionDataType>,
type_map: TypeDefs,
cfg: &ExportConfiguration,
) -> Result<String, TsExportError>
fn render( function_types: Vec<FunctionDataType>, type_map: TypeDefs, cfg: &ExportConfiguration, ) -> Result<String, TsExportError>
Renders the output of [globals], [render_functions] and all dependant types into a TypeScript string.
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.
Implementors§
impl ExportLanguage for tauri_specta::js::Language
Available on crate feature
javascript only.impl ExportLanguage for tauri_specta::ts::Language
Available on crate feature
typescript only.