Struct swc_ecma_utils::function::FunctionWrapper[][src]

pub struct FunctionWrapper<T> {
    pub binding_ident: Option<Ident>,
    pub function: Expr,
    // some fields omitted
}

Fields

binding_ident: Option<Ident>function: Expr

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

If a function has a function name, it may be called recursively. We use the named expression to hoist the function name internally Therefore, its recursive calls refer to the correct identity.

Else if a function has a binding name, it may be called recursively as well. But it refer the binding name which exist the outer scope. It is safe to using anonymous expression wrapper.

Optimization: A function without a name cannot be recursively referenced by Ident. It’s safe to return the expr without wrapper if the params.len is 0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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