Returns true if this type is one of the unsigned integer types.
(&self)
| 456 | |
| 457 | /// Returns true if this type is one of the unsigned integer types. |
| 458 | pub fn is_unsigned_integer(&self) -> bool { |
| 459 | use self::ExpressionType::*; |
| 460 | matches!(self, U8 | U16 | U32 | U64 | U128 | Usize) |
| 461 | } |
| 462 | |
| 463 | /// Returns the number of bits used to represent the given type, if primitive. |
| 464 | /// For non primitive types the result is just 0. |