[][src]Struct swc_ecma_ast::Function

pub struct Function {
    pub params: Vec<Pat>,
    pub decorators: Vec<Decorator>,
    pub span: Span,
    pub body: Option<BlockStmt>,
    pub is_generator: bool,
    pub is_async: bool,
    pub type_params: Option<TsTypeParamDecl>,
    pub return_type: Option<TsTypeAnn>,

Common parts of function and method.


params: Vec<Pat>decorators: Vec<Decorator>span: Spanbody: Option<BlockStmt>is_generator: bool

if it's a generator.

is_async: bool

if it's an async function.

type_params: Option<TsTypeParamDecl>return_type: Option<TsTypeAnn>

Trait Implementations

impl Clone for Function[src]

impl Debug for Function[src]

impl<'de> Deserialize<'de> for Function[src]

impl PartialEq<Function> for Function[src]

impl Serialize for Function[src]

impl Spanned for Function[src]

impl StructuralPartialEq for Function[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> Erased for T

impl<T> Erased for T

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.