glib/gobject/
type_value_table.rs1use crate::gobject_ffi;
4
5#[derive(Debug, Copy, Clone)]
6#[doc(alias = "GTypeValueTable")]
7#[repr(transparent)]
8pub struct TypeValueTable(pub(crate) gobject_ffi::GTypeValueTable);
9
10impl TypeValueTable {
11 #[doc(hidden)]
14 #[inline]
15 pub fn as_ptr(&self) -> *mut gobject_ffi::GTypeValueTable {
16 &self.0 as *const gobject_ffi::GTypeValueTable as *mut _
17 }
18
19 #[doc(hidden)]
22 #[inline]
23 pub unsafe fn from_glib_ptr_borrow_mut<'a>(
24 ptr: *mut gobject_ffi::GTypeValueTable,
25 ) -> &'a mut Self {
26 &mut *(ptr as *mut Self)
27 }
28}
29
30impl Default for TypeValueTable {
31 fn default() -> Self {
34 Self(gobject_ffi::GTypeValueTable {
35 value_init: None,
36 value_free: None,
37 value_copy: None,
38 value_peek_pointer: None,
39 collect_format: ::std::ptr::null(),
40 collect_value: None,
41 lcopy_format: ::std::ptr::null(),
42 lcopy_value: None,
43 })
44 }
45}