#[non_exhaustive]pub struct Typescript(/* private fields */);Expand description
JSDoc language exporter.
Implementations§
Source§impl Typescript
impl Typescript
Sourcepub fn new() -> Typescript
pub fn new() -> Typescript
Construct a new JSDoc exporter with the default options configured.
Sourcepub fn header(self, header: impl Into<Cow<'static, str>>) -> Typescript
pub fn header(self, header: impl Into<Cow<'static, str>>) -> Typescript
Configure a header for the file.
This is perfect for configuring lint ignore rules or other file-level comments.
Sourcepub fn layout(self, layout: Layout) -> Typescript
pub fn layout(self, layout: Layout) -> Typescript
Configure the layout of the generated file
Sourcepub fn branded_type_impl(
self,
builder: impl for<'a> Fn(BrandedTypeExporter<'a>, &Branded) -> Result<Cow<'static, str>, Error> + Send + Sync + 'static,
) -> Typescript
pub fn branded_type_impl( self, builder: impl for<'a> Fn(BrandedTypeExporter<'a>, &Branded) -> Result<Cow<'static, str>, Error> + Send + Sync + 'static, ) -> Typescript
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§fn clone(&self) -> Typescript
fn clone(&self) -> Typescript
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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§fn default() -> Typescript
fn default() -> Typescript
Returns the “default value” for a type. Read more
Source§impl From<Exporter> for Typescript
impl From<Exporter> for Typescript
Source§fn from(value: Exporter) -> Typescript
fn from(value: Exporter) -> Typescript
Converts to this type from the input type.
Source§impl From<Typescript> for Exporter
impl From<Typescript> for Exporter
Source§fn from(value: Typescript) -> Exporter
fn from(value: Typescript) -> Exporter
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