Struct rune::ast::Label [−][src]
pub struct Label { pub token: Token, pub source: StringSource, }
Expand description
A label, like 'foo
Fields
token: Token
The token of the label.
source: StringSource
The kind of the label.
Implementations
Construct a new label from the given string. The string should be
specified without the leading '
, so "foo"
instead of "'foo"
.
This constructor must only be used inside of a macro.
Panics
This will panic if it’s called outside of a macro context.
Construct a new label from the given string. The string should be
specified without the leading '
, so "foo"
instead of "'foo"
.
This constructor does not panic when called outside of a macro context
but requires access to a span
and storage
.
Trait Implementations
Parse the current item from the parser.
fn resolve_owned(
&self,
storage: &Storage,
source: &Source
) -> Result<Self::Owned, ResolveError>
fn resolve_owned(
&self,
storage: &Storage,
source: &Source
) -> Result<Self::Owned, ResolveError>
Resolve into an owned value.
Turn the current item into tokens.
Auto Trait Implementations
impl RefUnwindSafe for Label
impl UnwindSafe for Label
Blanket Implementations
Mutably borrows from an owned value. Read more