pub enum BasicType {
Show 30 variants
Boolean,
Char,
UChar,
Int,
UInt,
Long,
ULong,
Int64,
UInt64,
Float,
Double,
String,
Pointer,
Bool,
Short,
UShort,
LongLong,
ULongLong,
LongDouble,
Int8,
UInt8,
Int16,
UInt16,
Int32,
UInt32,
Size,
SSize,
Offset,
IntPtr,
UIntPtr,
}Expand description
A C/GLib primitive scalar type.
Variants marked with a G_TYPE_* have a counterpart in GType::as_basic().
The rest are valid C types that appear in TypeInfo but have no GType
registration (e.g. short, long long, fixed-width integers).
Variants§
Boolean
Char
UChar
Int
UInt
Long
ULong
Int64
UInt64
Float
Double
String
Pointer
Bool
Short
UShort
LongLong
ULongLong
LongDouble
Int8
UInt8
Int16
UInt16
Int32
UInt32
Size
SSize
Offset
IntPtr
UIntPtr
Implementations§
Source§impl BasicType
impl BasicType
Sourcepub fn canonical_glib(self) -> Option<&'static str>
pub fn canonical_glib(self) -> Option<&'static str>
The canonical GLib base-type spelling, or None if this type has no
GLib equivalent or the conversion would change the pointer depth
(e.g. gpointer ↔ void *).
Sourcepub fn canonical_c(self, current: &str) -> Option<&'static str>
pub fn canonical_c(self, current: &str) -> Option<&'static str>
The canonical C/C99 base-type spelling, or None if this type has no
clean C standard equivalent, the conversion would change the pointer
depth, or current is already an acceptable C spelling (e.g. unsigned
for unsigned int).
Trait Implementations§
impl Copy for BasicType
impl Eq for BasicType
impl StructuralPartialEq for BasicType
Auto Trait Implementations§
impl Freeze for BasicType
impl RefUnwindSafe for BasicType
impl Send for BasicType
impl Sync for BasicType
impl Unpin for BasicType
impl UnsafeUnpin for BasicType
impl UnwindSafe for BasicType
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