pub enum LitKind {
Str(Symbol, StrStyle),
ByteStr(Lrc<Vec<u8>>),
Byte(u8),
Char(char),
Int(u128, LitIntType),
Float(Symbol, FloatTy),
FloatUnsuffixed(Symbol),
Bool(bool),
}Literal kind.
E.g., "foo", 42, 12.34, or bool.
A string literal ("foo").
A character literal ('a').
A float literal (1f64 or 1E10f64).
A float literal without a suffix (1.0 or 1.0E10).
Returns true if this literal is a string.
Returns true if this literal is byte literal string.
Returns true if this is a numeric literal.
Returns true if this literal has no suffix.
Note: this will return true for literals with prefixes such as raw strings and byte strings.
Returns true if this literal has a suffix.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=.
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher]. Read more
Feeds a slice of this type into the given [Hasher]. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Mutably borrows from an owned value. Read more
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more