Struct Literal
pub struct Literal { pub span: Span, pub kind: LiteralKind, pub c: char }
A single literal expression.
A literal corresponds to a single Unicode scalar value. Literals may be
represented in their literal form, e.g., a or in their escaped form,
e.g., \x61.
Fields
span: SpanThe span of this literal.
kind: LiteralKindThe kind of this literal.
c: charThe Unicode scalar value corresponding to this literal.
Implementations
impl Literal
fn byte(&self) -> Option<u8>If this literal was written as a
\xhex escape, then this returns the corresponding byte value. Otherwise, this returnsNone.
Trait Implementations
impl Clone for Literal
fn clone(&self) -> Self
impl Debug for Literal
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Literal
impl PartialEq for Literal
fn eq(&self, other: &Self) -> bool