Struct tauri_specta::Exporter
source · pub struct Exporter<TLang: ExportLanguage> { /* private fields */ }
Expand description
General exporter, takes a generic for the specific language that is being exported to.
Implementations§
source§impl<TLang: ExportLanguage> Exporter<TLang>
impl<TLang: ExportLanguage> Exporter<TLang>
sourcepub fn new(
macro_data: Result<(Vec<FunctionDataType>, TypeDefs), ExportError>,
export_path: impl AsRef<Path>
) -> Self
pub fn new( macro_data: Result<(Vec<FunctionDataType>, TypeDefs), ExportError>, export_path: impl AsRef<Path> ) -> Self
Creates a new TypeScript exporter
sourcepub fn with_cfg(self, cfg: ExportConfiguration) -> Self
pub fn with_cfg(self, cfg: ExportConfiguration) -> Self
Allows for specifying a custom ExportConfiguration
.
sourcepub fn with_header(self, header: &'static str) -> Self
pub fn with_header(self, header: &'static str) -> Self
Allows for specifying a custom header to
sourcepub fn export(self) -> Result<(), TsExportError>
pub fn export(self) -> Result<(), TsExportError>
Exports the output of [internal::render
] for a collection of FunctionDataType
into a TypeScript file.
Auto Trait Implementations§
impl<TLang> RefUnwindSafe for Exporter<TLang>where TLang: RefUnwindSafe,
impl<TLang> Send for Exporter<TLang>where TLang: Send,
impl<TLang> Sync for Exporter<TLang>where TLang: Sync,
impl<TLang> Unpin for Exporter<TLang>where TLang: Unpin,
impl<TLang> UnwindSafe for Exporter<TLang>where TLang: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more