Enum rustc_lexer::LiteralKind [−][src]
pub enum LiteralKind {
Int {
base: Base,
empty_int: bool,
},
Float {
base: Base,
empty_exponent: bool,
},
Char {
terminated: bool,
},
Byte {
terminated: bool,
},
Str {
terminated: bool,
},
ByteStr {
terminated: bool,
},
RawStr {
n_hashes: u16,
err: Option<RawStrError>,
},
RawByteStr {
n_hashes: u16,
err: Option<RawStrError>,
},
}
Variants
“12_u8”, “0o100”, “0b120i99”
“12.34f32”, “0b100.100”
“‘a’”, “‘\’”, “‘’‘”, “’;”
Fields of Char
terminated: bool
“b’a’”, “b’\‘”, “b’‘’”, “b’;”
Fields of Byte
terminated: bool
““abc”“, ““abc”
Fields of Str
terminated: bool
“b“abc”“, “b“abc”
Fields of ByteStr
terminated: bool
“r“abc”“, “r#“abc”#“, “r####“ab”###“c”####“, “r#“a”
Fields of RawStr
n_hashes: u16
err: Option<RawStrError>
“br“abc”“, “br#“abc”#“, “br####“ab”###“c”####“, “br#“a”
Fields of RawByteStr
n_hashes: u16
err: Option<RawStrError>
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for LiteralKind
impl Send for LiteralKind
impl Sync for LiteralKind
impl Unpin for LiteralKind
impl UnwindSafe for LiteralKind
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes
Size for each variant:
Int
: 2 bytesFloat
: 2 bytesChar
: 1 byteByte
: 1 byteStr
: 1 byteByteStr
: 1 byteRawStr
: 47 bytesRawByteStr
: 47 bytes