Enum resast::expr::Lit [−][src]
pub enum Lit<'a> {
Null,
String(StringLit<'a>),
Number(Cow<'a, str>),
Boolean(bool),
RegEx(RegEx<'a>),
Template(TemplateLit<'a>),
}
Expand description
A literal value
Variants
Null
null
String(StringLit<'a>)
Tuple Fields
0: StringLit<'a>
"string"
'string'
Number(Cow<'a, str>)
0
0.0
.0
0.0e1
.0E1
0xf
0o7
0b1
Boolean(bool)
Tuple Fields
0: bool
true
false
RegEx(RegEx<'a>)
Tuple Fields
0: RegEx<'a>
/.+/g
Template(TemplateLit<'a>)
Tuple Fields
0: TemplateLit<'a>
`I have ${0} apples`
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Lit<'a>
impl<'a> UnwindSafe for Lit<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more