pub enum Type {
Show 17 variants
Basic(Basic),
Alias(Alias),
Enumeration(Enumeration),
Bitfield(Bitfield),
Record(Record),
Union(Union),
Function(Function),
Interface(Interface),
Class(Class),
Custom(Custom),
Array(TypeId),
CArray(TypeId),
FixedArray(TypeId, u16, Option<String>),
PtrArray(TypeId),
HashTable(TypeId, TypeId),
List(TypeId),
SList(TypeId),
}
Variants§
Basic(Basic)
Alias(Alias)
Enumeration(Enumeration)
Bitfield(Bitfield)
Record(Record)
Union(Union)
Function(Function)
Interface(Interface)
Class(Class)
Custom(Custom)
Array(TypeId)
CArray(TypeId)
FixedArray(TypeId, u16, Option<String>)
PtrArray(TypeId)
HashTable(TypeId, TypeId)
List(TypeId)
SList(TypeId)
Implementations§
source§impl Type
impl Type
pub fn get_name(&self) -> String
pub fn get_deprecated_version(&self) -> Option<Version>
pub fn get_glib_name(&self) -> Option<&str>
pub fn c_array( library: &mut Library, inner: TypeId, size: Option<u16>, c_type: Option<String>, ) -> TypeId
pub fn find_c_array( library: &Library, inner: TypeId, size: Option<u16>, ) -> TypeId
pub fn container( library: &mut Library, name: &str, inner: Vec<TypeId>, ) -> Option<TypeId>
pub fn function(library: &mut Library, func: Function) -> TypeId
pub fn union(library: &mut Library, u: Union, ns_id: u16) -> TypeId
pub fn record(library: &mut Library, r: Record, ns_id: u16) -> TypeId
pub fn functions(&self) -> &[Function]
pub fn is_basic(&self) -> bool
sourcepub fn is_basic_type(&self, env: &Env) -> bool
pub fn is_basic_type(&self, env: &Env) -> bool
If the type is an Alias containing a basic, it’ll return true (whereas
is_basic
won’t).
pub fn get_inner_type<'a>(&'a self, env: &'a Env) -> Option<(&'a Type, u16)>
pub fn is_function(&self) -> bool
pub fn is_class(&self) -> bool
pub fn is_interface(&self) -> bool
pub fn is_final_type(&self) -> bool
pub fn is_fundamental(&self) -> bool
pub fn is_abstract(&self) -> bool
pub fn is_enumeration(&self) -> bool
pub fn is_bitfield(&self) -> bool
Trait Implementations§
source§impl IsExternal for Type
impl IsExternal for Type
fn is_external(&self, lib: &Library) -> bool
source§impl IsIncomplete for Type
impl IsIncomplete for Type
fn is_incomplete(&self, lib: &Library) -> bool
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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> DerivesCopy for Twhere
T: IsIncomplete,
impl<T> DerivesCopy for Twhere
T: IsIncomplete,
fn derives_copy(&self, lib: &Library) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.