Struct swc_ecma_ast::Function[][src]

pub struct Function {
    pub params: Vec<Param>,
    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.

Fields

params: Vec<Param>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 Eq for Function[src]

impl EqIgnoreSpan for Function[src]

impl Hash for Function[src]

impl PartialEq<Function> for Function[src]

impl Serialize for Function[src]

impl Spanned for Function[src]

impl StructuralEq for Function[src]

impl StructuralPartialEq for Function[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.