pub struct TypeMapper { /* private fields */ }
Expand description
Type mapper for converting TypeScript types to Rust types
Implementations§
Source§impl TypeMapper
impl TypeMapper
Sourcepub fn map_type(&mut self, ts_type: &Type) -> Result<String>
pub fn map_type(&mut self, ts_type: &Type) -> Result<String>
Map a TypeScript type to Rust type
Sourcepub fn add_generic(&mut self, name: String)
pub fn add_generic(&mut self, name: String)
Add generic type parameter
Sourcepub fn get_generics(&self) -> &[String]
pub fn get_generics(&self) -> &[String]
Get all generic type parameters
Sourcepub fn clear_generics(&mut self)
pub fn clear_generics(&mut self)
Clear generic type parameters
Auto Trait Implementations§
impl Freeze for TypeMapper
impl RefUnwindSafe for TypeMapper
impl Send for TypeMapper
impl Sync for TypeMapper
impl Unpin for TypeMapper
impl UnwindSafe for TypeMapper
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