Struct JSDoc

Source
pub struct JSDoc(pub Typescript);
Expand description

JSDoc language exporter.

Tuple Fields§

§0: Typescript

Implementations§

Source§

impl JSDoc

Source

pub fn new() -> Self

Construct a new JSDoc exporter with the default options configured.

Source

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.

Source

pub fn bigint(self, bigint: BigIntExportBehavior) -> Self

Configure the BigInt handling behaviour

Source

pub fn comment_style(self, exporter: CommentFormatterFn) -> Self

Configure a function which is responsible for styling the comments to be exported

Implementations:

Not calling this method will default to the js_doc exporter. None will disable comment exporting. Some(exporter) will enable comment exporting using the provided exporter.

Source

pub fn formatter(self, formatter: FormatterFn) -> Self

Configure a function which is responsible for formatting the result file or files

Built-in implementations:

Trait Implementations§

Source§

impl Clone for JSDoc

Source§

fn clone(&self) -> JSDoc

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for JSDoc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for JSDoc

Source§

fn default() -> JSDoc

Returns the “default value” for a type. Read more
Source§

impl From<Typescript> for JSDoc

Source§

fn from(ts: Typescript) -> Self

Converts to this type from the input type.
Source§

impl Language for JSDoc

Source§

type Error = ExportError

TODO
Source§

fn export(&self, _type_map: &TypeCollection) -> Result<String, Self::Error>

TODO
Source§

fn format(&self, path: &Path) -> Result<(), Self::Error>

TODO

Auto Trait Implementations§

§

impl Freeze for JSDoc

§

impl RefUnwindSafe for JSDoc

§

impl Send for JSDoc

§

impl Sync for JSDoc

§

impl Unpin for JSDoc

§

impl UnwindSafe for JSDoc

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.