Enum Type

Source
pub enum Type {
Show 23 variants Invalid, Unit, I8, U8, Bool, I32, U32, ILong, ULong, I64, U64, F32, F64, String, Pointer, Variant, BaseInterface, BaseEnum, BaseFlags, BaseBoxed, BaseParamSpec, BaseObject, Other(usize),
}
Expand description

A GLib or GLib-based library type

Variants§

§

Invalid

An invalid Type used as error return value in some functions

§

Unit

The fundamental type corresponding to the unit type ()

§

I8

The fundamental type corresponding to i8

§

U8

The fundamental type corresponding to u8

§

Bool

The fundamental type corresponding to bool

§

I32

The fundamental type corresponding to i32

§

U32

The fundamental type corresponding to u32

§

ILong

The fundamental type corresponding to C long

§

ULong

The fundamental type corresponding to C unsigned long

§

I64

The fundamental type corresponding to i64

§

U64

The fundamental type corresponding to u64

§

F32

The fundamental type corresponding to f32

§

F64

The fundamental type corresponding to f64

§

String

The fundamental type corresponding to String

§

Pointer

The fundamental type corresponding to a pointer

§

Variant

The fundamental type of GVariant

§

BaseInterface

The fundamental type from which all interfaces are derived

§

BaseEnum

The fundamental type from which all enumeration types are derived

§

BaseFlags

The fundamental type from which all flags types are derived

§

BaseBoxed

The fundamental type from which all boxed types are derived

§

BaseParamSpec

The fundamental type from which all GParamSpec types are derived

§

BaseObject

The fundamental type from which all objects are derived

§

Other(usize)

A non-fundamental type identified by value of type usize

Implementations§

Source§

impl Type

Source

pub fn name(&self) -> String

Source

pub fn qname(&self) -> Quark

Source

pub fn is_a(&self, other: &Type) -> bool

Source

pub fn parent(&self) -> Option<Self>

Source

pub fn children(&self) -> Vec<Self>

Source

pub fn interfaces(&self) -> Vec<Self>

Source

pub fn interface_prerequisites(&self) -> Vec<Self>

Source

pub fn from_name<'a, P: Into<&'a str>>(name: P) -> Option<Self>

Trait Implementations§

Source§

impl Clone for Type

Source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Type

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Type

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromGlib<usize> for Type

Source§

impl FromGlibContainerAsVec<Type, *const usize> for Type

Source§

impl FromGlibContainerAsVec<Type, *mut usize> for Type

Source§

impl<'a> FromValue<'a> for Type

Source§

unsafe fn from_value(value: &'a Value) -> Self

Source§

impl<'a> FromValueOptional<'a> for Type

Source§

unsafe fn from_value_optional(value: &'a Value) -> Option<Self>

Source§

impl PartialEq for Type

Source§

fn eq(&self, other: &Type) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SetValue for Type

Source§

unsafe fn set_value(value: &mut Value, this: &Self)

Source§

impl StaticType for Type

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl ToGlib for Type

Source§

impl<'a> ToGlibContainerFromSlice<'a, *mut usize> for Type

Source§

impl Copy for Type

Source§

impl Eq for Type

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSendValue for T
where T: SetValue + Send + ToValue + ?Sized,

Source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToValue for T
where T: SetValue + ?Sized,

Source§

fn to_value(&self) -> Value

Returns a Value clone of self.
Source§

fn to_value_type(&self) -> Type

Returns the type identifer of self. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.