Struct _GTypeValueTable

Source
#[repr(C)]
pub struct _GTypeValueTable { pub value_init: GTypeValueInitFunc, pub value_free: GTypeValueFreeFunc, pub value_copy: GTypeValueCopyFunc, pub value_peek_pointer: GTypeValuePeekPointerFunc, pub collect_format: *const gchar, pub collect_value: GTypeValueCollectFunc, pub lcopy_format: *const gchar, pub lcopy_value: GTypeValueLCopyFunc, }
Expand description

GTypeValueTable: @value_init: Function to initialize a GValue @value_free: Function to free a GValue @value_copy: Function to copy a GValue @value_peek_pointer: Function to peek the contents of a GValue if they fit into a pointer @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are:

  • 'i': Integers, passed as collect_values[].v_int
  • 'l': Longs, passed as collect_values[].v_long
  • 'd': Doubles, passed as collect_values[].v_double
  • 'p': Pointers, passed as collect_values[].v_pointer It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'. @collect_value: Function to initialize a GValue from the values collected from variadic arguments @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations. @lcopy_value: Function to store the contents of a value into the locations collected from variadic arguments

The #GTypeValueTable provides the functions required by the #GValue implementation, to serve as a container for values of a type.

Fields§

§value_init: GTypeValueInitFunc§value_free: GTypeValueFreeFunc§value_copy: GTypeValueCopyFunc§value_peek_pointer: GTypeValuePeekPointerFunc§collect_format: *const gchar§collect_value: GTypeValueCollectFunc§lcopy_format: *const gchar§lcopy_value: GTypeValueLCopyFunc

Trait Implementations§

Source§

impl Clone for _GTypeValueTable

Source§

fn clone(&self) -> _GTypeValueTable

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 _GTypeValueTable

Source§

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

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

impl PartialEq for _GTypeValueTable

Source§

fn eq(&self, other: &_GTypeValueTable) -> 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 Copy for _GTypeValueTable

Source§

impl Eq for _GTypeValueTable

Source§

impl StructuralPartialEq for _GTypeValueTable

Auto Trait Implementations§

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, 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.