#[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 bigint(self, bigint: BigIntExportBehavior) -> Self
pub fn bigint(self, bigint: BigIntExportBehavior) -> Self
Configure the BigInt handling behaviour
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.
Sourcepub fn with_serde(self, mode: SerdeMode) -> Self
pub fn with_serde(self, mode: SerdeMode) -> Self
Configure the exporter to use specta-serde with the specified mode
Sourcepub fn with_serde_serialize(self) -> Self
pub fn with_serde_serialize(self) -> Self
Configure the exporter to export the types for #[derive(serde::Serialize)]
Sourcepub fn with_serde_deserialize(self) -> Self
pub fn with_serde_deserialize(self) -> Self
Configure the exporter to export the types for #[derive(serde::Deserialize)]
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§fn clone(&self) -> Typescript
fn clone(&self) -> Typescript
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 Freeze for Typescript
impl !RefUnwindSafe for Typescript
impl Send for Typescript
impl Sync for Typescript
impl Unpin for Typescript
impl UnsafeUnpin for Typescript
impl !UnwindSafe 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