Enum swc_ecma_ast::Decl[][src]

pub enum Decl {
    Class(ClassDecl),
    Fn(FnDecl),
    Var(VarDecl),
    TsInterface(TsInterfaceDecl),
    TsTypeAlias(TsTypeAliasDecl),
    TsEnum(TsEnumDecl),
    TsModule(TsModuleDecl),
}

Variants

Class(ClassDecl)
Fn(FnDecl)
Var(VarDecl)
TsInterface(TsInterfaceDecl)
TsTypeAlias(TsTypeAliasDecl)
TsEnum(TsEnumDecl)
TsModule(TsModuleDecl)

Implementations

Returns true if self is of variant Class.

Unwraps the value, yielding the content of Class.

Panics

Panics if the value is not Class, with a panic message including the content of self.

Returns Some if self is of variant Class, and None otherwise.

Returns true if self is of variant Fn.

Unwraps the value, yielding the content of Fn.

Panics

Panics if the value is not Fn, with a panic message including the content of self.

Returns Some if self is of variant Fn, and None otherwise.

Returns true if self is of variant Var.

Unwraps the value, yielding the content of Var.

Panics

Panics if the value is not Var, with a panic message including the content of self.

Returns Some if self is of variant Var, and None otherwise.

Returns true if self is of variant TsInterface.

Unwraps the value, yielding the content of TsInterface.

Panics

Panics if the value is not TsInterface, with a panic message including the content of self.

Returns Some if self is of variant TsInterface, and None otherwise.

Returns true if self is of variant TsTypeAlias.

Unwraps the value, yielding the content of TsTypeAlias.

Panics

Panics if the value is not TsTypeAlias, with a panic message including the content of self.

Returns Some if self is of variant TsTypeAlias, and None otherwise.

Returns true if self is of variant TsEnum.

Unwraps the value, yielding the content of TsEnum.

Panics

Panics if the value is not TsEnum, with a panic message including the content of self.

Returns Some if self is of variant TsEnum, and None otherwise.

Returns true if self is of variant TsModule.

Unwraps the value, yielding the content of TsModule.

Panics

Panics if the value is not TsModule, with a panic message including the content of self.

Returns Some if self is of variant TsModule, and None otherwise.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Get span of self.

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.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.