Enum clippy::consts::Constant
[−]
[src]
pub enum Constant { ConstantStr(String, StrStyle), ConstantBinary(Rc<Vec<u8>>), ConstantByte(u8), ConstantChar(char), ConstantInt(u64, LitIntType), ConstantFloat(String, FloatWidth), ConstantBool(bool), ConstantVec(Vec<Constant>), ConstantRepeat(Box<Constant>, usize), ConstantTuple(Vec<Constant>), }
a Lit_-like enum to fold constant Expr
s into
Variants
ConstantStr | a String "abc" |
ConstantBinary | a Binary String b"abc" |
ConstantByte | a single byte b'a' |
ConstantChar | a single char 'a' |
ConstantInt | an integer |
ConstantFloat | a float with given type |
ConstantBool | true or false |
ConstantVec | an array of constants |
ConstantRepeat | also an array, but with only one constant, repeated N times |
ConstantTuple | a tuple of constants |