Trait tauri_specta::ExportLanguage
source · 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.
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.