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>,
}
Expand description
Common parts of function and method.
Fields
params: Vec<Param>
decorators: Vec<Decorator>
span: Span
body: 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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Function
impl UnwindSafe for Function
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more