pub enum CppBuiltInNumericType {
Show 20 variants
Bool,
Char,
SChar,
UChar,
WChar,
Char16,
Char32,
Short,
UShort,
Int,
UInt,
Long,
ULong,
LongLong,
ULongLong,
Int128,
UInt128,
Float,
Double,
LongDouble,
}Expand description
Available built-in C++ numeric types.
All these types have corresponding
clang::TypeKind values (except for CharS and CharU
which map to CppBuiltInNumericType::Char)
Variants§
Bool
Char
SChar
UChar
WChar
Char16
Char32
Short
UShort
Int
UInt
Long
ULong
LongLong
ULongLong
Int128
UInt128
Float
Double
LongDouble
Implementations§
Source§impl CppBuiltInNumericType
impl CppBuiltInNumericType
Sourcepub fn to_cpp_code(&self) -> &'static str
pub fn to_cpp_code(&self) -> &'static str
Returns C++ code representing this type.
Sourcepub fn is_signed_integer(&self) -> bool
pub fn is_signed_integer(&self) -> bool
Returns true if this type is a signed integer.
Sourcepub fn is_unsigned_integer(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
Returns true if this type is an unsigned integer.
Sourcepub fn is_integer_with_undefined_signedness(&self) -> bool
pub fn is_integer_with_undefined_signedness(&self) -> bool
Returns true if this type is integer but may be signed or unsigned, depending on the platform.
Sourcepub fn all() -> &'static [CppBuiltInNumericType]
pub fn all() -> &'static [CppBuiltInNumericType]
Returns all supported types.
Trait Implementations§
Source§impl Clone for CppBuiltInNumericType
impl Clone for CppBuiltInNumericType
Source§fn clone(&self) -> CppBuiltInNumericType
fn clone(&self) -> CppBuiltInNumericType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CppBuiltInNumericType
impl Debug for CppBuiltInNumericType
Source§impl<'de> Deserialize<'de> for CppBuiltInNumericType
impl<'de> Deserialize<'de> for CppBuiltInNumericType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for CppBuiltInNumericType
impl Hash for CppBuiltInNumericType
Source§impl PartialEq for CppBuiltInNumericType
impl PartialEq for CppBuiltInNumericType
Source§impl Serialize for CppBuiltInNumericType
impl Serialize for CppBuiltInNumericType
impl Eq for CppBuiltInNumericType
impl StructuralPartialEq for CppBuiltInNumericType
Auto Trait Implementations§
impl Freeze for CppBuiltInNumericType
impl RefUnwindSafe for CppBuiltInNumericType
impl Send for CppBuiltInNumericType
impl Sync for CppBuiltInNumericType
impl Unpin for CppBuiltInNumericType
impl UnwindSafe for CppBuiltInNumericType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more