#[non_exhaustive]pub struct Typescript(/* private fields */);Expand description
JSDoc language exporter.
Implementations§
Source§impl Typescript
impl Typescript
Sourcepub fn header(self, header: impl Into<Cow<'static, str>>) -> Self
pub fn header(self, header: impl Into<Cow<'static, str>>) -> Self
Configure a header for the file.
This is perfect for configuring lint ignore rules or other file-level comments.
Sourcepub fn with_raw(self, raw: impl Into<Cow<'static, str>>) -> Self
pub fn with_raw(self, raw: impl Into<Cow<'static, str>>) -> Self
Add raw TypeScript code that is exported as part of the bindings.
Sourcepub fn branded_type_impl(
self,
builder: impl for<'a> Fn(BrandedTypeExporter<'a>, &Branded) -> Result<Cow<'static, str>, Error> + Send + Sync + 'static,
) -> Self
pub fn branded_type_impl( self, builder: impl for<'a> Fn(BrandedTypeExporter<'a>, &Branded) -> Result<Cow<'static, str>, Error> + Send + Sync + 'static, ) -> Self
Configure how specta_typescript::branded! types are rendered.
See Exporter::branded_type_impl for details.
Trait Implementations§
Source§impl AsMut<Exporter> for Typescript
impl AsMut<Exporter> for Typescript
Source§impl AsRef<Exporter> for Typescript
impl AsRef<Exporter> for Typescript
Source§impl Clone for Typescript
impl Clone for Typescript
Source§impl Debug for Typescript
impl Debug for Typescript
Source§impl Default for Typescript
impl Default for Typescript
Source§impl From<Exporter> for Typescript
impl From<Exporter> for Typescript
Source§impl From<Typescript> for Exporter
impl From<Typescript> for Exporter
Source§fn from(value: Typescript) -> Self
fn from(value: Typescript) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Typescript
impl !UnwindSafe for Typescript
impl Freeze for Typescript
impl Send for Typescript
impl Sync for Typescript
impl Unpin for Typescript
impl UnsafeUnpin for Typescript
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