pub struct TsModule {
pub ffi_lib: FfiLib,
pub type_defs: RustTypeDefs,
pub user_defs: UserDefinedDefs,
pub functions: FunctionDefs,
pub class_defs: ClassDefs,
}Fields§
§ffi_lib: FfiLib§type_defs: RustTypeDefs§user_defs: UserDefinedDefs§functions: FunctionDefs§class_defs: ClassDefsImplementations§
Source§impl TsModule
impl TsModule
pub fn new(file: File, opts: &CodegenOpts) -> Self
Sourcepub fn generate_single(self, opts: &CodegenOpts) -> String
pub fn generate_single(self, opts: &CodegenOpts) -> String
Generate a single typescript module with rust type definitions inlined
Sourcepub fn generate_multiple(
self,
opts: &CodegenOpts,
type_defs_name: &str,
) -> (String, String)
pub fn generate_multiple( self, opts: &CodegenOpts, type_defs_name: &str, ) -> (String, String)
Generate multiple typescript modules with rust type definitions on a separate file
Trait Implementations§
Auto Trait Implementations§
impl !Send for TsModule
impl !Sync for TsModule
impl Freeze for TsModule
impl RefUnwindSafe for TsModule
impl Unpin for TsModule
impl UnsafeUnpin for TsModule
impl UnwindSafe for TsModule
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