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’”, “‘\’”, “‘’‘”, “’;”
Show fields
Fields of Char
terminated: bool“b’a’”, “b’\‘”, “b’‘’”, “b’;”
Show fields
Fields of Byte
terminated: bool““abc”“, ““abc”
Show fields
Fields of Str
terminated: bool“b“abc”“, “b“abc”
Show fields
Fields of ByteStr
terminated: bool“r“abc”“, “r#“abc”#“, “r####“ab”###“c”####“, “r#“a”
Show fields
Fields of RawStr
n_hashes: u16err: Option<RawStrError>“br“abc”“, “br#“abc”#“, “br####“ab”###“c”####“, “br#“a”
Show fields
Fields of RawByteStr
n_hashes: u16err: 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 LiteralKindimpl Send for LiteralKindimpl Sync for LiteralKindimpl Unpin for LiteralKindimpl UnwindSafe for LiteralKindBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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