rune::ast

Trait OptionSpanned

Source
pub trait OptionSpanned {
    // Required method
    fn option_span(&self) -> Option<Span>;
}
Expand description

Types for which we can optionally get a span.

Required Methods§

Source

fn option_span(&self) -> Option<Span>

Get the optional span of the type.

Implementations on Foreign Types§

Source§

impl<T> OptionSpanned for Option<T>
where T: Spanned,

Source§

impl<T> OptionSpanned for [T]
where T: Spanned,

Take the span of a vector of spanned. Provides the span between the first and the last element.

Source§

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

Implementors§

Source§

impl OptionSpanned for AttrStyle

Source§

impl OptionSpanned for BinOp

Source§

impl OptionSpanned for Condition

Source§

impl OptionSpanned for Expr

Source§

impl OptionSpanned for ExprField

Source§

impl OptionSpanned for ExprRangeLimits

Source§

impl OptionSpanned for ExprSelectBranch

Source§

impl OptionSpanned for Fields

Source§

impl OptionSpanned for FnArg

Source§

impl OptionSpanned for Item

Source§

impl OptionSpanned for ItemModBody

Source§

impl OptionSpanned for ItemUseSegment

Source§

impl OptionSpanned for Lit

Source§

impl OptionSpanned for ObjectIdent

Source§

impl OptionSpanned for ObjectKey

Source§

impl OptionSpanned for Pat

Source§

impl OptionSpanned for PathSegment

Source§

impl OptionSpanned for Stmt

Source§

impl OptionSpanned for UnOp

Source§

impl OptionSpanned for Visibility

Source§

impl OptionSpanned for TokenStream

Source§

impl OptionSpanned for TokenStreamIter<'_>

Source§

impl OptionSpanned for Abstract

Source§

impl OptionSpanned for AlignOf

Source§

impl OptionSpanned for Amp

Source§

impl OptionSpanned for AmpAmp

Source§

impl OptionSpanned for AmpEq

Source§

impl OptionSpanned for Arrow

Source§

impl OptionSpanned for As

Source§

impl OptionSpanned for Async

Source§

impl OptionSpanned for At

Source§

impl OptionSpanned for Attribute

Source§

impl OptionSpanned for Await

Source§

impl OptionSpanned for Bang

Source§

impl OptionSpanned for BangEq

Source§

impl OptionSpanned for Become

Source§

impl OptionSpanned for Block

Source§

impl OptionSpanned for Break

Source§

impl OptionSpanned for Caret

Source§

impl OptionSpanned for CaretEq

Source§

impl OptionSpanned for CloseBrace

Source§

impl OptionSpanned for CloseBracket

Source§

impl OptionSpanned for CloseEmpty

Source§

impl OptionSpanned for CloseParen

Source§

impl OptionSpanned for Colon

Source§

impl OptionSpanned for ColonColon

Source§

impl OptionSpanned for Comma

Source§

impl OptionSpanned for Const

Source§

impl OptionSpanned for Continue

Source§

impl OptionSpanned for Crate

Source§

impl OptionSpanned for Dash

Source§

impl OptionSpanned for DashEq

Source§

impl OptionSpanned for Default

Source§

impl OptionSpanned for Div

Source§

impl OptionSpanned for Do

Source§

impl OptionSpanned for Dollar

Source§

impl OptionSpanned for Dot

Source§

impl OptionSpanned for DotDot

Source§

impl OptionSpanned for DotDotEq

Source§

impl OptionSpanned for Else

Source§

impl OptionSpanned for Enum

Source§

impl OptionSpanned for Eq

Source§

impl OptionSpanned for EqEq

Source§

impl OptionSpanned for ExprAssign

Source§

impl OptionSpanned for ExprAwait

Source§

impl OptionSpanned for ExprBinary

Source§

impl OptionSpanned for ExprBlock

Source§

impl OptionSpanned for ExprBreak

Source§

impl OptionSpanned for ExprCall

Source§

impl OptionSpanned for ExprClosure

Source§

impl OptionSpanned for ExprContinue

Source§

impl OptionSpanned for ExprDefaultBranch

Source§

impl OptionSpanned for ExprElse

Source§

impl OptionSpanned for ExprElseIf

Source§

impl OptionSpanned for ExprEmpty

Source§

impl OptionSpanned for ExprFieldAccess

Source§

impl OptionSpanned for ExprFor

Source§

impl OptionSpanned for ExprGroup

Source§

impl OptionSpanned for ExprIf

Source§

impl OptionSpanned for ExprIndex

Source§

impl OptionSpanned for ExprLet

Source§

impl OptionSpanned for ExprLit

Source§

impl OptionSpanned for ExprLoop

Source§

impl OptionSpanned for ExprMatch

Source§

impl OptionSpanned for ExprMatchBranch

Source§

impl OptionSpanned for ExprObject

Source§

impl OptionSpanned for ExprRange

Source§

impl OptionSpanned for ExprReturn

Source§

impl OptionSpanned for ExprSelect

Source§

impl OptionSpanned for ExprSelectPatBranch

Source§

impl OptionSpanned for ExprTry

Source§

impl OptionSpanned for ExprTuple

Source§

impl OptionSpanned for ExprUnary

Source§

impl OptionSpanned for ExprVec

Source§

impl OptionSpanned for ExprWhile

Source§

impl OptionSpanned for ExprYield

Source§

impl OptionSpanned for Extern

Source§

impl OptionSpanned for False

Source§

impl OptionSpanned for Field

Source§

impl OptionSpanned for FieldAssign

Source§

impl OptionSpanned for File

Source§

impl OptionSpanned for Final

Source§

impl OptionSpanned for Fn

Source§

impl OptionSpanned for For

Source§

impl OptionSpanned for Group

Source§

impl OptionSpanned for Gt

Source§

impl OptionSpanned for GtEq

Source§

impl OptionSpanned for GtGt

Source§

impl OptionSpanned for GtGtEq

Source§

impl OptionSpanned for Ident

Source§

impl OptionSpanned for If

Source§

impl OptionSpanned for Impl

Source§

impl OptionSpanned for In

Source§

impl OptionSpanned for Is

Source§

impl OptionSpanned for IsNot

Source§

impl OptionSpanned for ItemConst

Source§

impl OptionSpanned for ItemEnum

Source§

impl OptionSpanned for ItemFn

Source§

impl OptionSpanned for ItemImpl

Source§

impl OptionSpanned for ItemInlineBody

Source§

impl OptionSpanned for ItemMod

Source§

impl OptionSpanned for ItemStruct

Source§

impl OptionSpanned for ItemUse

Source§

impl OptionSpanned for ItemUsePath

Source§

impl OptionSpanned for ItemVariant

Source§

impl OptionSpanned for Label

Source§

impl OptionSpanned for Let

Source§

impl OptionSpanned for LitBool

Source§

impl OptionSpanned for LitByte

Source§

impl OptionSpanned for LitByteStr

Source§

impl OptionSpanned for LitChar

Source§

impl OptionSpanned for LitNumber

Source§

impl OptionSpanned for LitStr

Source§

impl OptionSpanned for Local

Source§

impl OptionSpanned for Loop

Source§

impl OptionSpanned for Lt

Source§

impl OptionSpanned for LtEq

Source§

impl OptionSpanned for LtLt

Source§

impl OptionSpanned for LtLtEq

Source§

impl OptionSpanned for Macro

Source§

impl OptionSpanned for MacroCall

Source§

impl OptionSpanned for Match

Source§

impl OptionSpanned for Mod

Source§

impl OptionSpanned for Move

Source§

impl OptionSpanned for Mut

Source§

impl OptionSpanned for Not

Source§

impl OptionSpanned for OffsetOf

Source§

impl OptionSpanned for OpenBrace

Source§

impl OptionSpanned for OpenBracket

Source§

impl OptionSpanned for OpenEmpty

Source§

impl OptionSpanned for OpenParen

Source§

impl OptionSpanned for Override

Source§

impl OptionSpanned for PatBinding

Source§

impl OptionSpanned for PatIgnore

Source§

impl OptionSpanned for PatLit

Source§

impl OptionSpanned for PatObject

Source§

impl OptionSpanned for PatPath

Source§

impl OptionSpanned for PatRest

Source§

impl OptionSpanned for PatTuple

Source§

impl OptionSpanned for PatVec

Source§

impl OptionSpanned for Path

Source§

impl OptionSpanned for PathSegmentExpr

Source§

impl OptionSpanned for Perc

Source§

impl OptionSpanned for PercEq

Source§

impl OptionSpanned for Pipe

Source§

impl OptionSpanned for PipeEq

Source§

impl OptionSpanned for PipePipe

Source§

impl OptionSpanned for Plus

Source§

impl OptionSpanned for PlusEq

Source§

impl OptionSpanned for Pound

Source§

impl OptionSpanned for Priv

Source§

impl OptionSpanned for Proc

Source§

impl OptionSpanned for Pub

Source§

impl OptionSpanned for Pure

Source§

impl OptionSpanned for QuestionMark

Source§

impl OptionSpanned for Ref

Source§

impl OptionSpanned for Return

Source§

impl OptionSpanned for Rocket

Source§

impl OptionSpanned for Select

Source§

impl OptionSpanned for SelfType

Source§

impl OptionSpanned for SelfValue

Source§

impl OptionSpanned for SemiColon

Source§

impl OptionSpanned for SizeOf

Source§

impl OptionSpanned for SlashEq

Source§

impl OptionSpanned for Star

Source§

impl OptionSpanned for StarEq

Source§

impl OptionSpanned for Static

Source§

impl OptionSpanned for StmtSemi

Source§

impl OptionSpanned for Struct

Source§

impl OptionSpanned for Super

Source§

impl OptionSpanned for Tilde

Source§

impl OptionSpanned for True

Source§

impl OptionSpanned for TypeOf

Source§

impl OptionSpanned for Underscore

Source§

impl OptionSpanned for Unsafe

Source§

impl OptionSpanned for Use

Source§

impl OptionSpanned for Virtual

Source§

impl OptionSpanned for While

Source§

impl OptionSpanned for Yield

Source§

impl<T> OptionSpanned for rune::alloc::Box<T>
where T: OptionSpanned,

Source§

impl<T: Spanned> OptionSpanned for EqValue<T>