swc_core::ecma::utils::swc_common

Trait Spanned

pub trait Spanned {
    // Required method
    fn span(&self) -> Span;

    // Provided methods
    fn span_lo(&self) -> BytePos { ... }
    fn span_hi(&self) -> BytePos { ... }
}
Available on crate features __ecma and __utils only.
Expand description

§Derive

This trait can be derived with #[derive(Spanned)].

Required Methods§

fn span(&self) -> Span

Get span of self.

Provided Methods§

fn span_lo(&self) -> BytePos

fn span_hi(&self) -> BytePos

Implementations on Foreign Types§

§

impl Spanned for AbsoluteColorBase

§

fn span(&self) -> Span

§

impl Spanned for AlphaValue

§

fn span(&self) -> Span

§

impl Spanned for AnPlusB

§

fn span(&self) -> Span

§

impl Spanned for AnPlusBNotation

§

fn span(&self) -> Span

§

impl Spanned for Angle

§

fn span(&self) -> Span

§

impl Spanned for AnglePercentage

§

fn span(&self) -> Span

§

impl Spanned for AnyNamespace

§

fn span(&self) -> Span

§

impl Spanned for AtRule

§

fn span(&self) -> Span

§

impl Spanned for AtRuleName

§

fn span(&self) -> Span

§

impl Spanned for AtRulePrelude

§

fn span(&self) -> Span

§

impl Spanned for AttributeSelector

§

fn span(&self) -> Span

§

impl Spanned for AttributeSelectorMatcher

§

fn span(&self) -> Span

§

impl Spanned for AttributeSelectorModifier

§

fn span(&self) -> Span

§

impl Spanned for AttributeSelectorValue

§

fn span(&self) -> Span

§

impl Spanned for CalcOperator

§

fn span(&self) -> Span

§

impl Spanned for CalcProduct

§

fn span(&self) -> Span

§

impl Spanned for CalcProductOrOperator

§

fn span(&self) -> Span

§

impl Spanned for CalcSum

§

fn span(&self) -> Span

§

impl Spanned for CalcValue

§

fn span(&self) -> Span

§

impl Spanned for CalcValueOrOperator

§

fn span(&self) -> Span

§

impl Spanned for ClassSelector

§

fn span(&self) -> Span

§

impl Spanned for CmykComponent

§

fn span(&self) -> Span

§

impl Spanned for Color

§

fn span(&self) -> Span

§

impl Spanned for ColorProfileName

§

fn span(&self) -> Span

§

impl Spanned for Combinator

§

fn span(&self) -> Span

§

impl Spanned for ComplexSelector

§

fn span(&self) -> Span

§

impl Spanned for ComplexSelectorChildren

§

fn span(&self) -> Span

§

impl Spanned for ComponentValue

§

fn span(&self) -> Span

§

impl Spanned for CompoundSelector

§

fn span(&self) -> Span

§

impl Spanned for CompoundSelectorList

§

fn span(&self) -> Span

§

impl Spanned for ContainerCondition

§

fn span(&self) -> Span

§

impl Spanned for ContainerName

§

fn span(&self) -> Span

§

impl Spanned for ContainerQuery

§

fn span(&self) -> Span

§

impl Spanned for ContainerQueryAnd

§

fn span(&self) -> Span

§

impl Spanned for ContainerQueryNot

§

fn span(&self) -> Span

§

impl Spanned for ContainerQueryOr

§

fn span(&self) -> Span

§

impl Spanned for ContainerQueryType

§

fn span(&self) -> Span

§

impl Spanned for CustomHighlightName

§

fn span(&self) -> Span

§

impl Spanned for CustomIdent

§

fn span(&self) -> Span

§

impl Spanned for CustomMediaQuery

§

fn span(&self) -> Span

§

impl Spanned for CustomMediaQueryMediaType

§

fn span(&self) -> Span

§

impl Spanned for CustomPropertyName

§

fn span(&self) -> Span

§

impl Spanned for DashedIdent

§

fn span(&self) -> Span

§

impl Spanned for Declaration

§

fn span(&self) -> Span

§

impl Spanned for DeclarationName

§

fn span(&self) -> Span

§

impl Spanned for DeclarationOrAtRule

§

fn span(&self) -> Span

§

impl Spanned for Delimiter

§

fn span(&self) -> Span

§

impl Spanned for Dimension

§

fn span(&self) -> Span

§

impl Spanned for DocumentPrelude

§

fn span(&self) -> Span

§

impl Spanned for DocumentPreludeMatchingFunction

§

fn span(&self) -> Span

§

impl Spanned for Error

§

fn span(&self) -> Span

§

impl Spanned for ExtensionName

§

fn span(&self) -> Span

§

impl Spanned for FamilyName

§

fn span(&self) -> Span

§

impl Spanned for Flex

§

fn span(&self) -> Span

§

impl Spanned for FontFeatureValuesPrelude

§

fn span(&self) -> Span

§

impl Spanned for ForgivingComplexSelector

§

fn span(&self) -> Span

§

impl Spanned for ForgivingRelativeSelector

§

fn span(&self) -> Span

§

impl Spanned for ForgivingRelativeSelectorList

§

fn span(&self) -> Span

§

impl Spanned for ForgivingSelectorList

§

fn span(&self) -> Span

§

impl Spanned for Frequency

§

fn span(&self) -> Span

§

impl Spanned for FrequencyPercentage

§

fn span(&self) -> Span

§

impl Spanned for Function

§

fn span(&self) -> Span

§

impl Spanned for FunctionName

§

fn span(&self) -> Span

§

impl Spanned for GeneralEnclosed

§

fn span(&self) -> Span

§

impl Spanned for HexColor

§

fn span(&self) -> Span

§

impl Spanned for Hue

§

fn span(&self) -> Span

§

impl Spanned for IdSelector

§

fn span(&self) -> Span

§

impl Spanned for Ident

§

fn span(&self) -> Span

§

impl Spanned for ImportConditions

§

fn span(&self) -> Span

§

impl Spanned for ImportHref

§

fn span(&self) -> Span

§

impl Spanned for ImportLayerName

§

fn span(&self) -> Span

§

impl Spanned for ImportPrelude

§

fn span(&self) -> Span

§

impl Spanned for ImportantFlag

§

fn span(&self) -> Span

§

impl Spanned for Integer

§

fn span(&self) -> Span

§

impl Spanned for KeyframeBlock

§

fn span(&self) -> Span

§

impl Spanned for KeyframeSelector

§

fn span(&self) -> Span

§

impl Spanned for KeyframesName

§

fn span(&self) -> Span

§

impl Spanned for KeyframesPseudoFunction

§

fn span(&self) -> Span

§

impl Spanned for KeyframesPseudoPrefix

§

fn span(&self) -> Span

§

impl Spanned for LayerName

§

fn span(&self) -> Span

§

impl Spanned for LayerNameList

§

fn span(&self) -> Span

§

impl Spanned for LayerPrelude

§

fn span(&self) -> Span

§

impl Spanned for Length

§

fn span(&self) -> Span

§

impl Spanned for LengthPercentage

§

fn span(&self) -> Span

§

impl Spanned for ListOfComponentValues

§

fn span(&self) -> Span

§

impl Spanned for MediaAnd

§

fn span(&self) -> Span

§

impl Spanned for MediaCondition

§

fn span(&self) -> Span

§

impl Spanned for MediaConditionAllType

§

fn span(&self) -> Span

§

impl Spanned for MediaConditionType

§

fn span(&self) -> Span

§

impl Spanned for MediaConditionWithoutOr

§

fn span(&self) -> Span

§

impl Spanned for MediaConditionWithoutOrType

§

fn span(&self) -> Span

§

impl Spanned for MediaFeature

§

fn span(&self) -> Span

§

impl Spanned for MediaFeatureBoolean

§

fn span(&self) -> Span

§

impl Spanned for MediaFeatureName

§

fn span(&self) -> Span

§

impl Spanned for MediaFeaturePlain

§

fn span(&self) -> Span

§

impl Spanned for MediaFeatureRange

§

fn span(&self) -> Span

§

impl Spanned for MediaFeatureRangeInterval

§

fn span(&self) -> Span

§

impl Spanned for MediaFeatureValue

§

fn span(&self) -> Span

§

impl Spanned for MediaInParens

§

fn span(&self) -> Span

§

impl Spanned for MediaNot

§

fn span(&self) -> Span

§

impl Spanned for MediaOr

§

fn span(&self) -> Span

§

impl Spanned for MediaQuery

§

fn span(&self) -> Span

§

impl Spanned for MediaQueryList

§

fn span(&self) -> Span

§

impl Spanned for MediaType

§

fn span(&self) -> Span

§

impl Spanned for NamedNamespace

§

fn span(&self) -> Span

§

impl Spanned for Namespace

§

fn span(&self) -> Span

§

impl Spanned for NamespacePrefix

§

fn span(&self) -> Span

§

impl Spanned for NamespacePrelude

§

fn span(&self) -> Span

§

impl Spanned for NamespacePreludeUri

§

fn span(&self) -> Span

§

impl Spanned for NestingSelector

§

fn span(&self) -> Span

§

impl Spanned for Number

§

fn span(&self) -> Span

§

impl Spanned for PageSelector

§

fn span(&self) -> Span

§

impl Spanned for PageSelectorList

§

fn span(&self) -> Span

§

impl Spanned for PageSelectorPseudo

§

fn span(&self) -> Span

§

impl Spanned for PageSelectorType

§

fn span(&self) -> Span

§

impl Spanned for Percentage

§

fn span(&self) -> Span

§

impl Spanned for PseudoClassSelector

§

fn span(&self) -> Span

§

impl Spanned for PseudoClassSelectorChildren

§

fn span(&self) -> Span

§

impl Spanned for PseudoElementSelector

§

fn span(&self) -> Span

§

impl Spanned for PseudoElementSelectorChildren

§

fn span(&self) -> Span

§

impl Spanned for QualifiedRule

§

fn span(&self) -> Span

§

impl Spanned for QualifiedRulePrelude

§

fn span(&self) -> Span

§

impl Spanned for QueryInParens

§

fn span(&self) -> Span

§

impl Spanned for Ratio

§

fn span(&self) -> Span

§

impl Spanned for RelativeSelector

§

fn span(&self) -> Span

§

impl Spanned for RelativeSelectorList

§

fn span(&self) -> Span

§

impl Spanned for Resolution

§

fn span(&self) -> Span

§

impl Spanned for Rule

§

fn span(&self) -> Span

§

impl Spanned for ScopeRange

§

fn span(&self) -> Span

§

impl Spanned for SelectorList

§

fn span(&self) -> Span

§

impl Spanned for SequenceOfCustomIdents

§

fn span(&self) -> Span

§

impl Spanned for SimpleBlock

§

fn span(&self) -> Span

§

impl Spanned for SizeFeature

§

fn span(&self) -> Span

§

impl Spanned for SizeFeatureBoolean

§

fn span(&self) -> Span

§

impl Spanned for SizeFeatureName

§

fn span(&self) -> Span

§

impl Spanned for SizeFeaturePlain

§

fn span(&self) -> Span

§

impl Spanned for SizeFeatureRange

§

fn span(&self) -> Span

§

impl Spanned for SizeFeatureRangeInterval

§

fn span(&self) -> Span

§

impl Spanned for SizeFeatureValue

§

fn span(&self) -> Span

§

impl Spanned for Str

§

fn span(&self) -> Span

§

impl Spanned for StyleBlock

§

fn span(&self) -> Span

§

impl Spanned for Stylesheet

§

fn span(&self) -> Span

§

impl Spanned for SubclassSelector

§

fn span(&self) -> Span

§

impl Spanned for SupportsAnd

§

fn span(&self) -> Span

§

impl Spanned for SupportsCondition

§

fn span(&self) -> Span

§

impl Spanned for SupportsConditionType

§

fn span(&self) -> Span

§

impl Spanned for SupportsFeature

§

fn span(&self) -> Span

§

impl Spanned for SupportsInParens

§

fn span(&self) -> Span

§

impl Spanned for SupportsNot

§

fn span(&self) -> Span

§

impl Spanned for SupportsOr

§

fn span(&self) -> Span

§

impl Spanned for TagNameSelector

§

fn span(&self) -> Span

§

impl Spanned for Time

§

fn span(&self) -> Span

§

impl Spanned for TimePercentage

§

fn span(&self) -> Span

§

impl Spanned for TokenAndSpan

§

fn span(&self) -> Span

§

impl Spanned for TokenAndSpan

§

fn span(&self) -> Span

§

impl Spanned for TypeSelector

§

fn span(&self) -> Span

§

impl Spanned for UnicodeRange

§

fn span(&self) -> Span

§

impl Spanned for UniversalSelector

§

fn span(&self) -> Span

§

impl Spanned for UnknownDimension

§

fn span(&self) -> Span

§

impl Spanned for Url

§

fn span(&self) -> Span

§

impl Spanned for UrlModifier

§

fn span(&self) -> Span

§

impl Spanned for UrlValue

§

fn span(&self) -> Span

§

impl Spanned for UrlValueRaw

§

fn span(&self) -> Span

§

impl Spanned for WqName

§

fn span(&self) -> Span

§

impl<S> Spanned for Option<S>
where S: Spanned,

§

fn span(&self) -> Span

§

fn span_lo(&self) -> BytePos

§

fn span_hi(&self) -> BytePos

§

impl<S> Spanned for &S
where S: Spanned + ?Sized,

§

fn span(&self) -> Span

§

fn span_lo(&self) -> BytePos

§

fn span_hi(&self) -> BytePos

§

impl<S> Spanned for Box<S>
where S: Spanned + ?Sized,

§

fn span(&self) -> Span

§

fn span_lo(&self) -> BytePos

§

fn span_hi(&self) -> BytePos

§

impl<S> Spanned for Rc<S>
where S: Spanned + ?Sized,

§

fn span(&self) -> Span

§

fn span_lo(&self) -> BytePos

§

fn span_hi(&self) -> BytePos

§

impl<T> Spanned for Cow<'_, T>
where T: Spanned + Clone,

§

fn span(&self) -> Span

§

fn span_lo(&self) -> BytePos

§

fn span_hi(&self) -> BytePos

§

impl<T> Spanned for Box<T>
where T: Spanned,

§

fn span(&self) -> Span

Implementors§

§

impl Spanned for AssignTarget

§

impl Spanned for AssignTargetPat

§

impl Spanned for BlockStmtOrExpr

§

impl Spanned for Callee

§

impl Spanned for ClassMember

§

impl Spanned for Decl

§

impl Spanned for DefaultDecl

§

impl Spanned for ExportSpecifier

§

impl Spanned for Expr

§

impl Spanned for ForHead

§

impl Spanned for ImportSpecifier

§

impl Spanned for JSXAttrName

§

impl Spanned for JSXAttrOrSpread

§

impl Spanned for JSXAttrValue

§

impl Spanned for JSXElementChild

§

impl Spanned for JSXElementName

§

impl Spanned for JSXExpr

§

impl Spanned for JSXObject

§

impl Spanned for Key

§

impl Spanned for Lit

§

impl Spanned for MemberProp

§

impl Spanned for ModuleDecl

§

impl Spanned for ModuleExportName

§

impl Spanned for ModuleItem

§

impl Spanned for ObjectPatProp

§

impl Spanned for OptChainBase

§

impl Spanned for ParamOrTsParamProp

§

impl Spanned for Pat

§

impl Spanned for Program

§

impl Spanned for Prop

§

impl Spanned for PropName

§

impl Spanned for PropOrSpread

§

impl Spanned for SimpleAssignTarget

§

impl Spanned for Stmt

§

impl Spanned for SuperProp

§

impl Spanned for TsEntityName

§

impl Spanned for TsEnumMemberId

§

impl Spanned for TsFnOrConstructorType

§

impl Spanned for TsFnParam

§

impl Spanned for TsLit

§

impl Spanned for TsModuleName

§

impl Spanned for TsModuleRef

§

impl Spanned for TsNamespaceBody

§

impl Spanned for TsParamPropParam

§

impl Spanned for TsThisTypeOrIdent

§

impl Spanned for TsType

§

impl Spanned for TsTypeElement

§

impl Spanned for TsTypeQueryExpr

§

impl Spanned for TsUnionOrIntersectionType

§

impl Spanned for VarDeclOrExpr

§

impl Spanned for Comment

§

impl Spanned for BytePos

§

impl Spanned for Span

§

impl Spanned for ArrayLit

§

impl Spanned for ArrayPat

§

impl Spanned for ArrowExpr

§

impl Spanned for AssignExpr

§

impl Spanned for AssignPat

§

impl Spanned for AssignPatProp

§

impl Spanned for AssignProp

§

impl Spanned for AutoAccessor

§

impl Spanned for AwaitExpr

§

impl Spanned for BigInt

§

impl Spanned for BinExpr

§

impl Spanned for BindingIdent

§

impl Spanned for BlockStmt

§

impl Spanned for Bool

§

impl Spanned for BreakStmt

§

impl Spanned for CallExpr

§

impl Spanned for CatchClause

§

impl Spanned for Class

§

impl Spanned for ClassDecl

§

impl Spanned for ClassExpr

§

impl Spanned for ClassMethod

§

impl Spanned for ClassProp

§

impl Spanned for ComputedPropName

§

impl Spanned for CondExpr

§

impl Spanned for Constructor

§

impl Spanned for ContinueStmt

§

impl Spanned for DebuggerStmt

§

impl Spanned for Decorator

§

impl Spanned for DoWhileStmt

§

impl Spanned for EmptyStmt

§

impl Spanned for ExportAll

§

impl Spanned for ExportDecl

§

impl Spanned for ExportDefaultDecl

§

impl Spanned for ExportDefaultExpr

§

impl Spanned for ExportDefaultSpecifier

§

impl Spanned for ExportNamedSpecifier

§

impl Spanned for ExportNamespaceSpecifier

§

impl Spanned for ExprOrSpread

§

impl Spanned for ExprStmt

§

impl Spanned for FnDecl

§

impl Spanned for FnExpr

§

impl Spanned for ForInStmt

§

impl Spanned for ForOfStmt

§

impl Spanned for ForStmt

§

impl Spanned for swc_core::ecma::utils::swc_ecma_ast::Function

§

impl Spanned for GetterProp

§

impl Spanned for swc_core::ecma::utils::swc_ecma_ast::Ident

§

impl Spanned for IdentName

§

impl Spanned for IfStmt

§

impl Spanned for Import

§

impl Spanned for ImportDecl

§

impl Spanned for ImportDefaultSpecifier

§

impl Spanned for ImportNamedSpecifier

§

impl Spanned for ImportStarAsSpecifier

§

impl Spanned for Invalid

§

impl Spanned for JSXAttr

§

impl Spanned for JSXClosingElement

§

impl Spanned for JSXClosingFragment

§

impl Spanned for JSXElement

§

impl Spanned for JSXEmptyExpr

§

impl Spanned for JSXExprContainer

§

impl Spanned for JSXFragment

§

impl Spanned for JSXMemberExpr

§

impl Spanned for JSXNamespacedName

§

impl Spanned for JSXOpeningElement

§

impl Spanned for JSXOpeningFragment

§

impl Spanned for JSXSpreadChild

§

impl Spanned for JSXText

§

impl Spanned for KeyValuePatProp

§

impl Spanned for KeyValueProp

§

impl Spanned for LabeledStmt

§

impl Spanned for MemberExpr

§

impl Spanned for MetaPropExpr

§

impl Spanned for MethodProp

§

impl Spanned for Module

§

impl Spanned for NamedExport

§

impl Spanned for NewExpr

§

impl Spanned for Null

§

impl Spanned for swc_core::ecma::utils::swc_ecma_ast::Number

§

impl Spanned for ObjectLit

§

impl Spanned for ObjectPat

§

impl Spanned for OptCall

§

impl Spanned for OptChainExpr

§

impl Spanned for Param

§

impl Spanned for ParenExpr

§

impl Spanned for PrivateMethod

§

impl Spanned for PrivateName

§

impl Spanned for PrivateProp

§

impl Spanned for Regex

§

impl Spanned for RestPat

§

impl Spanned for ReturnStmt

§

impl Spanned for Script

§

impl Spanned for SeqExpr

§

impl Spanned for SetterProp

§

impl Spanned for SpreadElement

§

impl Spanned for StaticBlock

§

impl Spanned for swc_core::ecma::utils::swc_ecma_ast::Str

§

impl Spanned for Super

§

impl Spanned for SuperPropExpr

§

impl Spanned for SwitchCase

§

impl Spanned for SwitchStmt

§

impl Spanned for TaggedTpl

§

impl Spanned for ThisExpr

§

impl Spanned for ThrowStmt

§

impl Spanned for Tpl

§

impl Spanned for TplElement

§

impl Spanned for TryStmt

§

impl Spanned for TsArrayType

§

impl Spanned for TsAsExpr

§

impl Spanned for TsCallSignatureDecl

§

impl Spanned for TsConditionalType

§

impl Spanned for TsConstAssertion

§

impl Spanned for TsConstructSignatureDecl

§

impl Spanned for TsConstructorType

§

impl Spanned for TsEnumDecl

§

impl Spanned for TsEnumMember

§

impl Spanned for TsExportAssignment

§

impl Spanned for TsExprWithTypeArgs

§

impl Spanned for TsExternalModuleRef

§

impl Spanned for TsFnType

§

impl Spanned for TsGetterSignature

§

impl Spanned for TsImportEqualsDecl

§

impl Spanned for TsImportType

§

impl Spanned for TsIndexSignature

§

impl Spanned for TsIndexedAccessType

§

impl Spanned for TsInferType

§

impl Spanned for TsInstantiation

§

impl Spanned for TsInterfaceBody

§

impl Spanned for TsInterfaceDecl

§

impl Spanned for TsIntersectionType

§

impl Spanned for TsKeywordType

§

impl Spanned for TsLitType

§

impl Spanned for TsMappedType

§

impl Spanned for TsMethodSignature

§

impl Spanned for TsModuleBlock

§

impl Spanned for TsModuleDecl

§

impl Spanned for TsNamespaceDecl

§

impl Spanned for TsNamespaceExportDecl

§

impl Spanned for TsNonNullExpr

§

impl Spanned for TsOptionalType

§

impl Spanned for TsParamProp

§

impl Spanned for TsParenthesizedType

§

impl Spanned for TsPropertySignature

§

impl Spanned for TsQualifiedName

§

impl Spanned for TsRestType

§

impl Spanned for TsSatisfiesExpr

§

impl Spanned for TsSetterSignature

§

impl Spanned for TsThisType

§

impl Spanned for TsTplLitType

§

impl Spanned for TsTupleElement

§

impl Spanned for TsTupleType

§

impl Spanned for TsTypeAliasDecl

§

impl Spanned for TsTypeAnn

§

impl Spanned for TsTypeAssertion

§

impl Spanned for TsTypeLit

§

impl Spanned for TsTypeOperator

§

impl Spanned for TsTypeParam

§

impl Spanned for TsTypeParamDecl

§

impl Spanned for TsTypeParamInstantiation

§

impl Spanned for TsTypePredicate

§

impl Spanned for TsTypeQuery

§

impl Spanned for TsTypeRef

§

impl Spanned for TsUnionType

§

impl Spanned for UnaryExpr

§

impl Spanned for UpdateExpr

§

impl Spanned for UsingDecl

§

impl Spanned for VarDecl

§

impl Spanned for VarDeclarator

§

impl Spanned for WhileStmt

§

impl Spanned for WithStmt

§

impl Spanned for YieldExpr

§

impl<A, B> Spanned for Either<A, B>
where A: Spanned, B: Spanned,

§

impl<S> Spanned for Arc<S>
where S: Spanned + ?Sized,