pub struct Type(_);
Expand description
A GLib or GLib-based library type
Implementations§
§impl Type
impl Type
pub const INVALID: Type = Self(gobject_ffi::G_TYPE_INVALID)
pub const INVALID: Type = Self(gobject_ffi::G_TYPE_INVALID)
An invalid Type
used as error return value in some functions
pub const UNIT: Type = Self(gobject_ffi::G_TYPE_NONE)
pub const UNIT: Type = Self(gobject_ffi::G_TYPE_NONE)
The fundamental type corresponding to the unit type ()
pub const U_LONG: Type = Self(gobject_ffi::G_TYPE_ULONG)
pub const U_LONG: Type = Self(gobject_ffi::G_TYPE_ULONG)
The fundamental type corresponding to C unsigned long
pub const STRING: Type = Self(gobject_ffi::G_TYPE_STRING)
pub const STRING: Type = Self(gobject_ffi::G_TYPE_STRING)
The fundamental type corresponding to String
pub const POINTER: Type = Self(gobject_ffi::G_TYPE_POINTER)
pub const POINTER: Type = Self(gobject_ffi::G_TYPE_POINTER)
The fundamental type corresponding to a pointer
pub const INTERFACE: Type = Self(gobject_ffi::G_TYPE_INTERFACE)
pub const INTERFACE: Type = Self(gobject_ffi::G_TYPE_INTERFACE)
The fundamental type from which all interfaces are derived
pub const ENUM: Type = Self(gobject_ffi::G_TYPE_ENUM)
pub const ENUM: Type = Self(gobject_ffi::G_TYPE_ENUM)
The fundamental type from which all enumeration types are derived
pub const FLAGS: Type = Self(gobject_ffi::G_TYPE_FLAGS)
pub const FLAGS: Type = Self(gobject_ffi::G_TYPE_FLAGS)
The fundamental type from which all flags types are derived
pub const BOXED: Type = Self(gobject_ffi::G_TYPE_BOXED)
pub const BOXED: Type = Self(gobject_ffi::G_TYPE_BOXED)
The fundamental type from which all boxed types are derived
pub const PARAM_SPEC: Type = Self(gobject_ffi::G_TYPE_PARAM)
pub const PARAM_SPEC: Type = Self(gobject_ffi::G_TYPE_PARAM)
The fundamental type from which all GParamSpec
types are derived
pub const OBJECT: Type = Self(gobject_ffi::G_TYPE_OBJECT)
pub const OBJECT: Type = Self(gobject_ffi::G_TYPE_OBJECT)
The fundamental type from which all objects are derived
pub fn name<'a>(self) -> &'a str
pub fn qname(self) -> Quark
pub fn is_a(self, other: Type) -> bool
pub fn parent(self) -> Option<Type>
pub fn children(self) -> Slice<Type>
pub fn interfaces(self) -> Slice<Type>
pub fn interface_prerequisites(self) -> Slice<Type>
pub fn from_name(name: &str) -> Option<Type>
Trait Implementations§
§impl From<SignalType> for Type
impl From<SignalType> for Type
§fn from(type_: SignalType) -> Type
fn from(type_: SignalType) -> Type
Converts to this type from the input type.
§impl From<Type> for SignalType
impl From<Type> for SignalType
§fn from(type_: Type) -> SignalType
fn from(type_: Type) -> SignalType
Converts to this type from the input type.
§impl FromGlibContainerAsVec<Type, *const usize> for SignalType
impl FromGlibContainerAsVec<Type, *const usize> for SignalType
unsafe fn from_glib_none_num_as_vec( ptr: *const usize, num: usize ) -> Vec<SignalType, Global> ⓘ
unsafe fn from_glib_container_num_as_vec( _: *const usize, _: usize ) -> Vec<SignalType, Global> ⓘ
unsafe fn from_glib_full_num_as_vec( _: *const usize, _: usize ) -> Vec<SignalType, Global> ⓘ
§impl Ord for Type
impl Ord for Type
§impl PartialEq<Type> for SignalType
impl PartialEq<Type> for SignalType
§impl PartialOrd<Type> for Type
impl PartialOrd<Type> for Type
§fn partial_cmp(&self, other: &Type) -> Option<Ordering>
fn partial_cmp(&self, other: &Type) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl StaticType for Type
impl StaticType for Type
§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.§impl<'a> ToGlibContainerFromSlice<'a, *mut usize> for Type
impl<'a> ToGlibContainerFromSlice<'a, *mut usize> for Type
type Storage = Option<Vec<usize, Global>>
fn to_glib_none_from_slice( t: &'a [Type] ) -> (*mut usize, <Type as ToGlibContainerFromSlice<'a, *mut usize>>::Storage)
fn to_glib_container_from_slice( t: &'a [Type] ) -> (*mut usize, <Type as ToGlibContainerFromSlice<'a, *mut usize>>::Storage)
fn to_glib_full_from_slice(t: &[Type]) -> *mut usize
impl Copy for Type
impl Eq for Type
impl StructuralEq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.
§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere T: StaticType,
§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
§impl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere T: Send + ToValue + ?Sized,
§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.