Enum clippy::consts::Constant
[−]
[src]
pub enum Constant { Str(String, StrStyle), Binary(Rc<Vec<u8>>), Byte(u8), Char(char), Int(u64, LitIntType, Sign), Float(String, FloatWidth), Bool(bool), Vec(Vec<Constant>), Repeat(Box<Constant>, usize), Tuple(Vec<Constant>), }
a Lit_-like enum to fold constant Expr
s into
Variants
Str | a String "abc" | |
Binary | a Binary String b"abc" | |
Byte | a single byte b'a' | |
Char | a single char 'a' | |
Int | an integer, third argument is whether the value is negated | |
Float | a float with given type | |
Bool | true or false | |
Vec | an array of constants | |
Repeat | also an array, but with only one constant, repeated N times | |
Tuple | a tuple of constants |