pub enum GObjectTypeKind {
Declare {
kind: DeclareKind,
module_prefix: String,
type_prefix: String,
},
Define(DefineKind),
DefineBoxed {
copy_func: String,
free_func: String,
},
DefineQuark {
quark_name: String,
func_prefix: String,
},
DefineEnum {
values: Vec<EnumValueDef>,
},
DefineFlags {
values: Vec<EnumValueDef>,
},
DefineCustom {
macro_name: String,
},
}Variants§
Declare
G_DECLARE_FINAL_TYPE / G_DECLARE_DERIVABLE_TYPE / G_DECLARE_INTERFACE
Define(DefineKind)
All G_DEFINE_TYPE* / G_DEFINE_INTERFACE* variants (not boxed/pointer/extended)
DefineBoxed
G_DEFINE_BOXED_TYPE / G_DEFINE_BOXED_TYPE_WITH_CODE
DefineQuark
G_DEFINE_QUARK(quark-name, func_prefix) → generates func_prefix_quark()
DefineEnum
G_DEFINE_ENUM_TYPE(TypeName, func_prefix, G_DEFINE_ENUM_VALUE(…), …)
Fields
§
values: Vec<EnumValueDef>DefineFlags
G_DEFINE_FLAGS_TYPE(TypeName, func_prefix, G_DEFINE_ENUM_VALUE(…), …)
Fields
§
values: Vec<EnumValueDef>DefineCustom
Project-specific DEFINE_TYPE macros (e.g. GDK_DEFINE_EVENT_TYPE)
Implementations§
Source§impl GObjectTypeKind
impl GObjectTypeKind
Sourcepub fn macro_name(&self) -> &str
pub fn macro_name(&self) -> &str
Returns the macro name for this type declaration/definition
Sourcepub fn is_declare(&self) -> bool
pub fn is_declare(&self) -> bool
Returns true if this is a G_DECLARE_* macro
Sourcepub fn quark_function_name(&self) -> Option<String>
pub fn quark_function_name(&self) -> Option<String>
For DefineQuark, returns the generated quark function name
(func_prefix_quark).
Sourcepub fn is_compatible_with(&self, define: &Self) -> bool
pub fn is_compatible_with(&self, define: &Self) -> bool
Check if a declare kind is compatible with a define kind
Trait Implementations§
Source§impl Clone for GObjectTypeKind
impl Clone for GObjectTypeKind
Source§impl Debug for GObjectTypeKind
impl Debug for GObjectTypeKind
Auto Trait Implementations§
impl Freeze for GObjectTypeKind
impl RefUnwindSafe for GObjectTypeKind
impl Send for GObjectTypeKind
impl Sync for GObjectTypeKind
impl Unpin for GObjectTypeKind
impl UnsafeUnpin for GObjectTypeKind
impl UnwindSafe for GObjectTypeKind
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