Struct swc_ecma_transforms::pass::Optional [−]
pub struct Optional<V> {
pub enabled: bool,
pub visitor: V,
}
Expand description
A visitor which visits node only if enabled
is true.
Fields
enabled: bool
visitor: V
Implementations
Trait Implementations
pub fn fold_class_members(
&mut self,
n: Vec<ClassMember, Global>
) -> Vec<ClassMember, Global>ⓘ
pub fn fold_export_default_specifier(
&mut self,
n: ExportDefaultSpecifier
) -> ExportDefaultSpecifier
pub fn fold_export_named_specifier(
&mut self,
n: ExportNamedSpecifier
) -> ExportNamedSpecifier
pub fn fold_export_namespace_specifier(
&mut self,
n: ExportNamespaceSpecifier
) -> ExportNamespaceSpecifier
pub fn fold_export_specifiers(
&mut self,
n: Vec<ExportSpecifier, Global>
) -> Vec<ExportSpecifier, Global>ⓘ
pub fn fold_expr_or_spreads(
&mut self,
n: Vec<ExprOrSpread, Global>
) -> Vec<ExprOrSpread, Global>ⓘ
pub fn fold_import_default_specifier(
&mut self,
n: ImportDefaultSpecifier
) -> ImportDefaultSpecifier
pub fn fold_import_named_specifier(
&mut self,
n: ImportNamedSpecifier
) -> ImportNamedSpecifier
pub fn fold_import_specifiers(
&mut self,
n: Vec<ImportSpecifier, Global>
) -> Vec<ImportSpecifier, Global>ⓘ
pub fn fold_import_star_as_specifier(
&mut self,
n: ImportStarAsSpecifier
) -> ImportStarAsSpecifier
pub fn fold_jsx_attr_or_spreads(
&mut self,
n: Vec<JSXAttrOrSpread, Global>
) -> Vec<JSXAttrOrSpread, Global>ⓘ
pub fn fold_jsx_element_children(
&mut self,
n: Vec<JSXElementChild, Global>
) -> Vec<JSXElementChild, Global>ⓘ
pub fn fold_module_items(
&mut self,
n: Vec<ModuleItem, Global>
) -> Vec<ModuleItem, Global>ⓘ
pub fn fold_object_pat_props(
&mut self,
n: Vec<ObjectPatProp, Global>
) -> Vec<ObjectPatProp, Global>ⓘ
pub fn fold_opt_expr_or_spreads(
&mut self,
n: Option<Vec<ExprOrSpread, Global>>
) -> Option<Vec<ExprOrSpread, Global>>
pub fn fold_opt_js_word(
&mut self,
n: Option<Atom<JsWordStaticSet>>
) -> Option<Atom<JsWordStaticSet>>
pub fn fold_opt_jsx_closing_element(
&mut self,
n: Option<JSXClosingElement>
) -> Option<JSXClosingElement>
pub fn fold_opt_module_export_name(
&mut self,
n: Option<ModuleExportName>
) -> Option<ModuleExportName>
pub fn fold_opt_ts_namespace_body(
&mut self,
n: Option<TsNamespaceBody>
) -> Option<TsNamespaceBody>
pub fn fold_opt_ts_type_param_decl(
&mut self,
n: Option<TsTypeParamDecl>
) -> Option<TsTypeParamDecl>
pub fn fold_opt_ts_type_param_instantiation(
&mut self,
n: Option<TsTypeParamInstantiation>
) -> Option<TsTypeParamInstantiation>
pub fn fold_opt_var_decl_or_expr(
&mut self,
n: Option<VarDeclOrExpr>
) -> Option<VarDeclOrExpr>
pub fn fold_opt_vec_expr_or_spreads(
&mut self,
n: Vec<Option<ExprOrSpread>, Global>
) -> Vec<Option<ExprOrSpread>, Global>ⓘ
pub fn fold_param_or_ts_param_props(
&mut self,
n: Vec<ParamOrTsParamProp, Global>
) -> Vec<ParamOrTsParamProp, Global>ⓘ
pub fn fold_prop_or_spreads(
&mut self,
n: Vec<PropOrSpread, Global>
) -> Vec<PropOrSpread, Global>ⓘ
pub fn fold_switch_cases(
&mut self,
n: Vec<SwitchCase, Global>
) -> Vec<SwitchCase, Global>ⓘ
pub fn fold_tpl_elements(
&mut self,
n: Vec<TplElement, Global>
) -> Vec<TplElement, Global>ⓘ
pub fn fold_ts_construct_signature_decl(
&mut self,
n: TsConstructSignatureDecl
) -> TsConstructSignatureDecl
pub fn fold_ts_enum_members(
&mut self,
n: Vec<TsEnumMember, Global>
) -> Vec<TsEnumMember, Global>ⓘ
pub fn fold_ts_expr_with_type_args_vec(
&mut self,
n: Vec<TsExprWithTypeArgs, Global>
) -> Vec<TsExprWithTypeArgs, Global>ⓘ
pub fn fold_ts_fn_or_constructor_type(
&mut self,
n: TsFnOrConstructorType
) -> TsFnOrConstructorType
pub fn fold_ts_namespace_export_decl(
&mut self,
n: TsNamespaceExportDecl
) -> TsNamespaceExportDecl
pub fn fold_ts_tuple_elements(
&mut self,
n: Vec<TsTupleElement, Global>
) -> Vec<TsTupleElement, Global>ⓘ
pub fn fold_ts_type_elements(
&mut self,
n: Vec<TsTypeElement, Global>
) -> Vec<TsTypeElement, Global>ⓘ
pub fn fold_ts_type_param_instantiation(
&mut self,
n: TsTypeParamInstantiation
) -> TsTypeParamInstantiation
pub fn fold_ts_type_params(
&mut self,
n: Vec<TsTypeParam, Global>
) -> Vec<TsTypeParam, Global>ⓘ
pub fn fold_ts_types(
&mut self,
n: Vec<Box<TsType, Global>, Global>
) -> Vec<Box<TsType, Global>, Global>ⓘ
pub fn fold_ts_union_or_intersection_type(
&mut self,
n: TsUnionOrIntersectionType
) -> TsUnionOrIntersectionType
pub fn fold_var_declarators(
&mut self,
n: Vec<VarDeclarator, Global>
) -> Vec<VarDeclarator, Global>ⓘ
pub fn visit_mut_opt_ts_type_param_instantiation(
&mut self,
n: &mut Option<TsTypeParamInstantiation>
)
pub fn visit_mut_opt_vec_expr_or_spreads(
&mut self,
n: &mut Vec<Option<ExprOrSpread>, Global>
)
pub fn visit_mut_ts_expr_with_type_args_vec(
&mut self,
n: &mut Vec<TsExprWithTypeArgs, Global>
)
impl<V> StructuralEq for Optional<V>
impl<V> StructuralPartialEq for Optional<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for Optional<V> where
V: RefUnwindSafe,
impl<V> UnwindSafe for Optional<V> where
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
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