1 // This file was generated by gir (https://github.com/gtk-rs/gir)
2 // from gir-files (https://github.com/gtk-rs/gir-files)
3 // DO NOT EDIT
4 
5 use glib::error::ErrorDomain;
6 use glib::translate::*;
7 use glib::value::FromValue;
8 use glib::value::ToValue;
9 use glib::Quark;
10 use glib::StaticType;
11 use glib::Type;
12 use std::fmt;
13 
14 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
15 #[non_exhaustive]
16 #[doc(alias = "GBusType")]
17 pub enum BusType {
18     #[doc(alias = "G_BUS_TYPE_STARTER")]
19     Starter,
20     #[doc(alias = "G_BUS_TYPE_NONE")]
21     None,
22     #[doc(alias = "G_BUS_TYPE_SYSTEM")]
23     System,
24     #[doc(alias = "G_BUS_TYPE_SESSION")]
25     Session,
26     #[doc(hidden)]
27     __Unknown(i32),
28 }
29 
30 impl fmt::Display for BusType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result31     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
32         write!(
33             f,
34             "BusType::{}",
35             match *self {
36                 Self::Starter => "Starter",
37                 Self::None => "None",
38                 Self::System => "System",
39                 Self::Session => "Session",
40                 _ => "Unknown",
41             }
42         )
43     }
44 }
45 
46 #[doc(hidden)]
47 impl IntoGlib for BusType {
48     type GlibType = ffi::GBusType;
49 
into_glib(self) -> ffi::GBusType50     fn into_glib(self) -> ffi::GBusType {
51         match self {
52             Self::Starter => ffi::G_BUS_TYPE_STARTER,
53             Self::None => ffi::G_BUS_TYPE_NONE,
54             Self::System => ffi::G_BUS_TYPE_SYSTEM,
55             Self::Session => ffi::G_BUS_TYPE_SESSION,
56             Self::__Unknown(value) => value,
57         }
58     }
59 }
60 
61 #[doc(hidden)]
62 impl FromGlib<ffi::GBusType> for BusType {
from_glib(value: ffi::GBusType) -> Self63     unsafe fn from_glib(value: ffi::GBusType) -> Self {
64         match value {
65             ffi::G_BUS_TYPE_STARTER => Self::Starter,
66             ffi::G_BUS_TYPE_NONE => Self::None,
67             ffi::G_BUS_TYPE_SYSTEM => Self::System,
68             ffi::G_BUS_TYPE_SESSION => Self::Session,
69             value => Self::__Unknown(value),
70         }
71     }
72 }
73 
74 impl StaticType for BusType {
static_type() -> Type75     fn static_type() -> Type {
76         unsafe { from_glib(ffi::g_bus_type_get_type()) }
77     }
78 }
79 
80 impl glib::value::ValueType for BusType {
81     type Type = Self;
82 }
83 
84 unsafe impl<'a> FromValue<'a> for BusType {
85     type Checker = glib::value::GenericValueTypeChecker<Self>;
86 
from_value(value: &'a glib::Value) -> Self87     unsafe fn from_value(value: &'a glib::Value) -> Self {
88         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
89     }
90 }
91 
92 impl ToValue for BusType {
to_value(&self) -> glib::Value93     fn to_value(&self) -> glib::Value {
94         let mut value = glib::Value::for_value_type::<Self>();
95         unsafe {
96             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
97         }
98         value
99     }
100 
value_type(&self) -> glib::Type101     fn value_type(&self) -> glib::Type {
102         Self::static_type()
103     }
104 }
105 
106 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
107 #[non_exhaustive]
108 #[doc(alias = "GConverterResult")]
109 pub enum ConverterResult {
110     #[doc(alias = "G_CONVERTER_ERROR")]
111     Error,
112     #[doc(alias = "G_CONVERTER_CONVERTED")]
113     Converted,
114     #[doc(alias = "G_CONVERTER_FINISHED")]
115     Finished,
116     #[doc(alias = "G_CONVERTER_FLUSHED")]
117     Flushed,
118     #[doc(hidden)]
119     __Unknown(i32),
120 }
121 
122 impl fmt::Display for ConverterResult {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result123     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
124         write!(
125             f,
126             "ConverterResult::{}",
127             match *self {
128                 Self::Error => "Error",
129                 Self::Converted => "Converted",
130                 Self::Finished => "Finished",
131                 Self::Flushed => "Flushed",
132                 _ => "Unknown",
133             }
134         )
135     }
136 }
137 
138 #[doc(hidden)]
139 impl IntoGlib for ConverterResult {
140     type GlibType = ffi::GConverterResult;
141 
into_glib(self) -> ffi::GConverterResult142     fn into_glib(self) -> ffi::GConverterResult {
143         match self {
144             Self::Error => ffi::G_CONVERTER_ERROR,
145             Self::Converted => ffi::G_CONVERTER_CONVERTED,
146             Self::Finished => ffi::G_CONVERTER_FINISHED,
147             Self::Flushed => ffi::G_CONVERTER_FLUSHED,
148             Self::__Unknown(value) => value,
149         }
150     }
151 }
152 
153 #[doc(hidden)]
154 impl FromGlib<ffi::GConverterResult> for ConverterResult {
from_glib(value: ffi::GConverterResult) -> Self155     unsafe fn from_glib(value: ffi::GConverterResult) -> Self {
156         match value {
157             ffi::G_CONVERTER_ERROR => Self::Error,
158             ffi::G_CONVERTER_CONVERTED => Self::Converted,
159             ffi::G_CONVERTER_FINISHED => Self::Finished,
160             ffi::G_CONVERTER_FLUSHED => Self::Flushed,
161             value => Self::__Unknown(value),
162         }
163     }
164 }
165 
166 impl StaticType for ConverterResult {
static_type() -> Type167     fn static_type() -> Type {
168         unsafe { from_glib(ffi::g_converter_result_get_type()) }
169     }
170 }
171 
172 impl glib::value::ValueType for ConverterResult {
173     type Type = Self;
174 }
175 
176 unsafe impl<'a> FromValue<'a> for ConverterResult {
177     type Checker = glib::value::GenericValueTypeChecker<Self>;
178 
from_value(value: &'a glib::Value) -> Self179     unsafe fn from_value(value: &'a glib::Value) -> Self {
180         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
181     }
182 }
183 
184 impl ToValue for ConverterResult {
to_value(&self) -> glib::Value185     fn to_value(&self) -> glib::Value {
186         let mut value = glib::Value::for_value_type::<Self>();
187         unsafe {
188             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
189         }
190         value
191     }
192 
value_type(&self) -> glib::Type193     fn value_type(&self) -> glib::Type {
194         Self::static_type()
195     }
196 }
197 
198 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
199 #[non_exhaustive]
200 #[doc(alias = "GCredentialsType")]
201 pub enum CredentialsType {
202     #[doc(alias = "G_CREDENTIALS_TYPE_INVALID")]
203     Invalid,
204     #[doc(alias = "G_CREDENTIALS_TYPE_LINUX_UCRED")]
205     LinuxUcred,
206     #[doc(alias = "G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED")]
207     FreebsdCmsgcred,
208     #[doc(alias = "G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED")]
209     OpenbsdSockpeercred,
210     #[doc(alias = "G_CREDENTIALS_TYPE_SOLARIS_UCRED")]
211     SolarisUcred,
212     #[doc(alias = "G_CREDENTIALS_TYPE_NETBSD_UNPCBID")]
213     NetbsdUnpcbid,
214     #[doc(alias = "G_CREDENTIALS_TYPE_APPLE_XUCRED")]
215     AppleXucred,
216     #[doc(hidden)]
217     __Unknown(i32),
218 }
219 
220 impl fmt::Display for CredentialsType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result221     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
222         write!(
223             f,
224             "CredentialsType::{}",
225             match *self {
226                 Self::Invalid => "Invalid",
227                 Self::LinuxUcred => "LinuxUcred",
228                 Self::FreebsdCmsgcred => "FreebsdCmsgcred",
229                 Self::OpenbsdSockpeercred => "OpenbsdSockpeercred",
230                 Self::SolarisUcred => "SolarisUcred",
231                 Self::NetbsdUnpcbid => "NetbsdUnpcbid",
232                 Self::AppleXucred => "AppleXucred",
233                 _ => "Unknown",
234             }
235         )
236     }
237 }
238 
239 #[doc(hidden)]
240 impl IntoGlib for CredentialsType {
241     type GlibType = ffi::GCredentialsType;
242 
into_glib(self) -> ffi::GCredentialsType243     fn into_glib(self) -> ffi::GCredentialsType {
244         match self {
245             Self::Invalid => ffi::G_CREDENTIALS_TYPE_INVALID,
246             Self::LinuxUcred => ffi::G_CREDENTIALS_TYPE_LINUX_UCRED,
247             Self::FreebsdCmsgcred => ffi::G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED,
248             Self::OpenbsdSockpeercred => ffi::G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED,
249             Self::SolarisUcred => ffi::G_CREDENTIALS_TYPE_SOLARIS_UCRED,
250             Self::NetbsdUnpcbid => ffi::G_CREDENTIALS_TYPE_NETBSD_UNPCBID,
251             Self::AppleXucred => ffi::G_CREDENTIALS_TYPE_APPLE_XUCRED,
252             Self::__Unknown(value) => value,
253         }
254     }
255 }
256 
257 #[doc(hidden)]
258 impl FromGlib<ffi::GCredentialsType> for CredentialsType {
from_glib(value: ffi::GCredentialsType) -> Self259     unsafe fn from_glib(value: ffi::GCredentialsType) -> Self {
260         match value {
261             ffi::G_CREDENTIALS_TYPE_INVALID => Self::Invalid,
262             ffi::G_CREDENTIALS_TYPE_LINUX_UCRED => Self::LinuxUcred,
263             ffi::G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED => Self::FreebsdCmsgcred,
264             ffi::G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED => Self::OpenbsdSockpeercred,
265             ffi::G_CREDENTIALS_TYPE_SOLARIS_UCRED => Self::SolarisUcred,
266             ffi::G_CREDENTIALS_TYPE_NETBSD_UNPCBID => Self::NetbsdUnpcbid,
267             ffi::G_CREDENTIALS_TYPE_APPLE_XUCRED => Self::AppleXucred,
268             value => Self::__Unknown(value),
269         }
270     }
271 }
272 
273 impl StaticType for CredentialsType {
static_type() -> Type274     fn static_type() -> Type {
275         unsafe { from_glib(ffi::g_credentials_type_get_type()) }
276     }
277 }
278 
279 impl glib::value::ValueType for CredentialsType {
280     type Type = Self;
281 }
282 
283 unsafe impl<'a> FromValue<'a> for CredentialsType {
284     type Checker = glib::value::GenericValueTypeChecker<Self>;
285 
from_value(value: &'a glib::Value) -> Self286     unsafe fn from_value(value: &'a glib::Value) -> Self {
287         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
288     }
289 }
290 
291 impl ToValue for CredentialsType {
to_value(&self) -> glib::Value292     fn to_value(&self) -> glib::Value {
293         let mut value = glib::Value::for_value_type::<Self>();
294         unsafe {
295             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
296         }
297         value
298     }
299 
value_type(&self) -> glib::Type300     fn value_type(&self) -> glib::Type {
301         Self::static_type()
302     }
303 }
304 
305 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
306 #[non_exhaustive]
307 #[doc(alias = "GDBusMessageByteOrder")]
308 pub enum DBusMessageByteOrder {
309     #[doc(alias = "G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN")]
310     BigEndian,
311     #[doc(alias = "G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN")]
312     LittleEndian,
313     #[doc(hidden)]
314     __Unknown(i32),
315 }
316 
317 impl fmt::Display for DBusMessageByteOrder {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result318     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
319         write!(
320             f,
321             "DBusMessageByteOrder::{}",
322             match *self {
323                 Self::BigEndian => "BigEndian",
324                 Self::LittleEndian => "LittleEndian",
325                 _ => "Unknown",
326             }
327         )
328     }
329 }
330 
331 #[doc(hidden)]
332 impl IntoGlib for DBusMessageByteOrder {
333     type GlibType = ffi::GDBusMessageByteOrder;
334 
into_glib(self) -> ffi::GDBusMessageByteOrder335     fn into_glib(self) -> ffi::GDBusMessageByteOrder {
336         match self {
337             Self::BigEndian => ffi::G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN,
338             Self::LittleEndian => ffi::G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN,
339             Self::__Unknown(value) => value,
340         }
341     }
342 }
343 
344 #[doc(hidden)]
345 impl FromGlib<ffi::GDBusMessageByteOrder> for DBusMessageByteOrder {
from_glib(value: ffi::GDBusMessageByteOrder) -> Self346     unsafe fn from_glib(value: ffi::GDBusMessageByteOrder) -> Self {
347         match value {
348             ffi::G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN => Self::BigEndian,
349             ffi::G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN => Self::LittleEndian,
350             value => Self::__Unknown(value),
351         }
352     }
353 }
354 
355 impl StaticType for DBusMessageByteOrder {
static_type() -> Type356     fn static_type() -> Type {
357         unsafe { from_glib(ffi::g_dbus_message_byte_order_get_type()) }
358     }
359 }
360 
361 impl glib::value::ValueType for DBusMessageByteOrder {
362     type Type = Self;
363 }
364 
365 unsafe impl<'a> FromValue<'a> for DBusMessageByteOrder {
366     type Checker = glib::value::GenericValueTypeChecker<Self>;
367 
from_value(value: &'a glib::Value) -> Self368     unsafe fn from_value(value: &'a glib::Value) -> Self {
369         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
370     }
371 }
372 
373 impl ToValue for DBusMessageByteOrder {
to_value(&self) -> glib::Value374     fn to_value(&self) -> glib::Value {
375         let mut value = glib::Value::for_value_type::<Self>();
376         unsafe {
377             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
378         }
379         value
380     }
381 
value_type(&self) -> glib::Type382     fn value_type(&self) -> glib::Type {
383         Self::static_type()
384     }
385 }
386 
387 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
388 #[non_exhaustive]
389 #[doc(alias = "GDBusMessageHeaderField")]
390 pub enum DBusMessageHeaderField {
391     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_INVALID")]
392     Invalid,
393     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_PATH")]
394     Path,
395     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE")]
396     Interface,
397     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_MEMBER")]
398     Member,
399     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME")]
400     ErrorName,
401     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL")]
402     ReplySerial,
403     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION")]
404     Destination,
405     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_SENDER")]
406     Sender,
407     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE")]
408     Signature,
409     #[doc(alias = "G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS")]
410     NumUnixFds,
411     #[doc(hidden)]
412     __Unknown(i32),
413 }
414 
415 impl fmt::Display for DBusMessageHeaderField {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result416     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
417         write!(
418             f,
419             "DBusMessageHeaderField::{}",
420             match *self {
421                 Self::Invalid => "Invalid",
422                 Self::Path => "Path",
423                 Self::Interface => "Interface",
424                 Self::Member => "Member",
425                 Self::ErrorName => "ErrorName",
426                 Self::ReplySerial => "ReplySerial",
427                 Self::Destination => "Destination",
428                 Self::Sender => "Sender",
429                 Self::Signature => "Signature",
430                 Self::NumUnixFds => "NumUnixFds",
431                 _ => "Unknown",
432             }
433         )
434     }
435 }
436 
437 #[doc(hidden)]
438 impl IntoGlib for DBusMessageHeaderField {
439     type GlibType = ffi::GDBusMessageHeaderField;
440 
into_glib(self) -> ffi::GDBusMessageHeaderField441     fn into_glib(self) -> ffi::GDBusMessageHeaderField {
442         match self {
443             Self::Invalid => ffi::G_DBUS_MESSAGE_HEADER_FIELD_INVALID,
444             Self::Path => ffi::G_DBUS_MESSAGE_HEADER_FIELD_PATH,
445             Self::Interface => ffi::G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE,
446             Self::Member => ffi::G_DBUS_MESSAGE_HEADER_FIELD_MEMBER,
447             Self::ErrorName => ffi::G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME,
448             Self::ReplySerial => ffi::G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL,
449             Self::Destination => ffi::G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION,
450             Self::Sender => ffi::G_DBUS_MESSAGE_HEADER_FIELD_SENDER,
451             Self::Signature => ffi::G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE,
452             Self::NumUnixFds => ffi::G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS,
453             Self::__Unknown(value) => value,
454         }
455     }
456 }
457 
458 #[doc(hidden)]
459 impl FromGlib<ffi::GDBusMessageHeaderField> for DBusMessageHeaderField {
from_glib(value: ffi::GDBusMessageHeaderField) -> Self460     unsafe fn from_glib(value: ffi::GDBusMessageHeaderField) -> Self {
461         match value {
462             ffi::G_DBUS_MESSAGE_HEADER_FIELD_INVALID => Self::Invalid,
463             ffi::G_DBUS_MESSAGE_HEADER_FIELD_PATH => Self::Path,
464             ffi::G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE => Self::Interface,
465             ffi::G_DBUS_MESSAGE_HEADER_FIELD_MEMBER => Self::Member,
466             ffi::G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME => Self::ErrorName,
467             ffi::G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL => Self::ReplySerial,
468             ffi::G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION => Self::Destination,
469             ffi::G_DBUS_MESSAGE_HEADER_FIELD_SENDER => Self::Sender,
470             ffi::G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE => Self::Signature,
471             ffi::G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS => Self::NumUnixFds,
472             value => Self::__Unknown(value),
473         }
474     }
475 }
476 
477 impl StaticType for DBusMessageHeaderField {
static_type() -> Type478     fn static_type() -> Type {
479         unsafe { from_glib(ffi::g_dbus_message_header_field_get_type()) }
480     }
481 }
482 
483 impl glib::value::ValueType for DBusMessageHeaderField {
484     type Type = Self;
485 }
486 
487 unsafe impl<'a> FromValue<'a> for DBusMessageHeaderField {
488     type Checker = glib::value::GenericValueTypeChecker<Self>;
489 
from_value(value: &'a glib::Value) -> Self490     unsafe fn from_value(value: &'a glib::Value) -> Self {
491         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
492     }
493 }
494 
495 impl ToValue for DBusMessageHeaderField {
to_value(&self) -> glib::Value496     fn to_value(&self) -> glib::Value {
497         let mut value = glib::Value::for_value_type::<Self>();
498         unsafe {
499             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
500         }
501         value
502     }
503 
value_type(&self) -> glib::Type504     fn value_type(&self) -> glib::Type {
505         Self::static_type()
506     }
507 }
508 
509 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
510 #[non_exhaustive]
511 #[doc(alias = "GDBusMessageType")]
512 pub enum DBusMessageType {
513     #[doc(alias = "G_DBUS_MESSAGE_TYPE_INVALID")]
514     Invalid,
515     #[doc(alias = "G_DBUS_MESSAGE_TYPE_METHOD_CALL")]
516     MethodCall,
517     #[doc(alias = "G_DBUS_MESSAGE_TYPE_METHOD_RETURN")]
518     MethodReturn,
519     #[doc(alias = "G_DBUS_MESSAGE_TYPE_ERROR")]
520     Error,
521     #[doc(alias = "G_DBUS_MESSAGE_TYPE_SIGNAL")]
522     Signal,
523     #[doc(hidden)]
524     __Unknown(i32),
525 }
526 
527 impl fmt::Display for DBusMessageType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result528     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
529         write!(
530             f,
531             "DBusMessageType::{}",
532             match *self {
533                 Self::Invalid => "Invalid",
534                 Self::MethodCall => "MethodCall",
535                 Self::MethodReturn => "MethodReturn",
536                 Self::Error => "Error",
537                 Self::Signal => "Signal",
538                 _ => "Unknown",
539             }
540         )
541     }
542 }
543 
544 #[doc(hidden)]
545 impl IntoGlib for DBusMessageType {
546     type GlibType = ffi::GDBusMessageType;
547 
into_glib(self) -> ffi::GDBusMessageType548     fn into_glib(self) -> ffi::GDBusMessageType {
549         match self {
550             Self::Invalid => ffi::G_DBUS_MESSAGE_TYPE_INVALID,
551             Self::MethodCall => ffi::G_DBUS_MESSAGE_TYPE_METHOD_CALL,
552             Self::MethodReturn => ffi::G_DBUS_MESSAGE_TYPE_METHOD_RETURN,
553             Self::Error => ffi::G_DBUS_MESSAGE_TYPE_ERROR,
554             Self::Signal => ffi::G_DBUS_MESSAGE_TYPE_SIGNAL,
555             Self::__Unknown(value) => value,
556         }
557     }
558 }
559 
560 #[doc(hidden)]
561 impl FromGlib<ffi::GDBusMessageType> for DBusMessageType {
from_glib(value: ffi::GDBusMessageType) -> Self562     unsafe fn from_glib(value: ffi::GDBusMessageType) -> Self {
563         match value {
564             ffi::G_DBUS_MESSAGE_TYPE_INVALID => Self::Invalid,
565             ffi::G_DBUS_MESSAGE_TYPE_METHOD_CALL => Self::MethodCall,
566             ffi::G_DBUS_MESSAGE_TYPE_METHOD_RETURN => Self::MethodReturn,
567             ffi::G_DBUS_MESSAGE_TYPE_ERROR => Self::Error,
568             ffi::G_DBUS_MESSAGE_TYPE_SIGNAL => Self::Signal,
569             value => Self::__Unknown(value),
570         }
571     }
572 }
573 
574 impl StaticType for DBusMessageType {
static_type() -> Type575     fn static_type() -> Type {
576         unsafe { from_glib(ffi::g_dbus_message_type_get_type()) }
577     }
578 }
579 
580 impl glib::value::ValueType for DBusMessageType {
581     type Type = Self;
582 }
583 
584 unsafe impl<'a> FromValue<'a> for DBusMessageType {
585     type Checker = glib::value::GenericValueTypeChecker<Self>;
586 
from_value(value: &'a glib::Value) -> Self587     unsafe fn from_value(value: &'a glib::Value) -> Self {
588         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
589     }
590 }
591 
592 impl ToValue for DBusMessageType {
to_value(&self) -> glib::Value593     fn to_value(&self) -> glib::Value {
594         let mut value = glib::Value::for_value_type::<Self>();
595         unsafe {
596             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
597         }
598         value
599     }
600 
value_type(&self) -> glib::Type601     fn value_type(&self) -> glib::Type {
602         Self::static_type()
603     }
604 }
605 
606 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
607 #[non_exhaustive]
608 #[doc(alias = "GDataStreamByteOrder")]
609 pub enum DataStreamByteOrder {
610     #[doc(alias = "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")]
611     BigEndian,
612     #[doc(alias = "G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN")]
613     LittleEndian,
614     #[doc(alias = "G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN")]
615     HostEndian,
616     #[doc(hidden)]
617     __Unknown(i32),
618 }
619 
620 impl fmt::Display for DataStreamByteOrder {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result621     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
622         write!(
623             f,
624             "DataStreamByteOrder::{}",
625             match *self {
626                 Self::BigEndian => "BigEndian",
627                 Self::LittleEndian => "LittleEndian",
628                 Self::HostEndian => "HostEndian",
629                 _ => "Unknown",
630             }
631         )
632     }
633 }
634 
635 #[doc(hidden)]
636 impl IntoGlib for DataStreamByteOrder {
637     type GlibType = ffi::GDataStreamByteOrder;
638 
into_glib(self) -> ffi::GDataStreamByteOrder639     fn into_glib(self) -> ffi::GDataStreamByteOrder {
640         match self {
641             Self::BigEndian => ffi::G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN,
642             Self::LittleEndian => ffi::G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN,
643             Self::HostEndian => ffi::G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN,
644             Self::__Unknown(value) => value,
645         }
646     }
647 }
648 
649 #[doc(hidden)]
650 impl FromGlib<ffi::GDataStreamByteOrder> for DataStreamByteOrder {
from_glib(value: ffi::GDataStreamByteOrder) -> Self651     unsafe fn from_glib(value: ffi::GDataStreamByteOrder) -> Self {
652         match value {
653             ffi::G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN => Self::BigEndian,
654             ffi::G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN => Self::LittleEndian,
655             ffi::G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN => Self::HostEndian,
656             value => Self::__Unknown(value),
657         }
658     }
659 }
660 
661 impl StaticType for DataStreamByteOrder {
static_type() -> Type662     fn static_type() -> Type {
663         unsafe { from_glib(ffi::g_data_stream_byte_order_get_type()) }
664     }
665 }
666 
667 impl glib::value::ValueType for DataStreamByteOrder {
668     type Type = Self;
669 }
670 
671 unsafe impl<'a> FromValue<'a> for DataStreamByteOrder {
672     type Checker = glib::value::GenericValueTypeChecker<Self>;
673 
from_value(value: &'a glib::Value) -> Self674     unsafe fn from_value(value: &'a glib::Value) -> Self {
675         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
676     }
677 }
678 
679 impl ToValue for DataStreamByteOrder {
to_value(&self) -> glib::Value680     fn to_value(&self) -> glib::Value {
681         let mut value = glib::Value::for_value_type::<Self>();
682         unsafe {
683             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
684         }
685         value
686     }
687 
value_type(&self) -> glib::Type688     fn value_type(&self) -> glib::Type {
689         Self::static_type()
690     }
691 }
692 
693 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
694 #[non_exhaustive]
695 #[doc(alias = "GDataStreamNewlineType")]
696 pub enum DataStreamNewlineType {
697     #[doc(alias = "G_DATA_STREAM_NEWLINE_TYPE_LF")]
698     Lf,
699     #[doc(alias = "G_DATA_STREAM_NEWLINE_TYPE_CR")]
700     Cr,
701     #[doc(alias = "G_DATA_STREAM_NEWLINE_TYPE_CR_LF")]
702     CrLf,
703     #[doc(alias = "G_DATA_STREAM_NEWLINE_TYPE_ANY")]
704     Any,
705     #[doc(hidden)]
706     __Unknown(i32),
707 }
708 
709 impl fmt::Display for DataStreamNewlineType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result710     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
711         write!(
712             f,
713             "DataStreamNewlineType::{}",
714             match *self {
715                 Self::Lf => "Lf",
716                 Self::Cr => "Cr",
717                 Self::CrLf => "CrLf",
718                 Self::Any => "Any",
719                 _ => "Unknown",
720             }
721         )
722     }
723 }
724 
725 #[doc(hidden)]
726 impl IntoGlib for DataStreamNewlineType {
727     type GlibType = ffi::GDataStreamNewlineType;
728 
into_glib(self) -> ffi::GDataStreamNewlineType729     fn into_glib(self) -> ffi::GDataStreamNewlineType {
730         match self {
731             Self::Lf => ffi::G_DATA_STREAM_NEWLINE_TYPE_LF,
732             Self::Cr => ffi::G_DATA_STREAM_NEWLINE_TYPE_CR,
733             Self::CrLf => ffi::G_DATA_STREAM_NEWLINE_TYPE_CR_LF,
734             Self::Any => ffi::G_DATA_STREAM_NEWLINE_TYPE_ANY,
735             Self::__Unknown(value) => value,
736         }
737     }
738 }
739 
740 #[doc(hidden)]
741 impl FromGlib<ffi::GDataStreamNewlineType> for DataStreamNewlineType {
from_glib(value: ffi::GDataStreamNewlineType) -> Self742     unsafe fn from_glib(value: ffi::GDataStreamNewlineType) -> Self {
743         match value {
744             ffi::G_DATA_STREAM_NEWLINE_TYPE_LF => Self::Lf,
745             ffi::G_DATA_STREAM_NEWLINE_TYPE_CR => Self::Cr,
746             ffi::G_DATA_STREAM_NEWLINE_TYPE_CR_LF => Self::CrLf,
747             ffi::G_DATA_STREAM_NEWLINE_TYPE_ANY => Self::Any,
748             value => Self::__Unknown(value),
749         }
750     }
751 }
752 
753 impl StaticType for DataStreamNewlineType {
static_type() -> Type754     fn static_type() -> Type {
755         unsafe { from_glib(ffi::g_data_stream_newline_type_get_type()) }
756     }
757 }
758 
759 impl glib::value::ValueType for DataStreamNewlineType {
760     type Type = Self;
761 }
762 
763 unsafe impl<'a> FromValue<'a> for DataStreamNewlineType {
764     type Checker = glib::value::GenericValueTypeChecker<Self>;
765 
from_value(value: &'a glib::Value) -> Self766     unsafe fn from_value(value: &'a glib::Value) -> Self {
767         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
768     }
769 }
770 
771 impl ToValue for DataStreamNewlineType {
to_value(&self) -> glib::Value772     fn to_value(&self) -> glib::Value {
773         let mut value = glib::Value::for_value_type::<Self>();
774         unsafe {
775             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
776         }
777         value
778     }
779 
value_type(&self) -> glib::Type780     fn value_type(&self) -> glib::Type {
781         Self::static_type()
782     }
783 }
784 
785 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
786 #[non_exhaustive]
787 #[doc(alias = "GDriveStartStopType")]
788 pub enum DriveStartStopType {
789     #[doc(alias = "G_DRIVE_START_STOP_TYPE_UNKNOWN")]
790     Unknown,
791     #[doc(alias = "G_DRIVE_START_STOP_TYPE_SHUTDOWN")]
792     Shutdown,
793     #[doc(alias = "G_DRIVE_START_STOP_TYPE_NETWORK")]
794     Network,
795     #[doc(alias = "G_DRIVE_START_STOP_TYPE_MULTIDISK")]
796     Multidisk,
797     #[doc(alias = "G_DRIVE_START_STOP_TYPE_PASSWORD")]
798     Password,
799     #[doc(hidden)]
800     __Unknown(i32),
801 }
802 
803 impl fmt::Display for DriveStartStopType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result804     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
805         write!(
806             f,
807             "DriveStartStopType::{}",
808             match *self {
809                 Self::Unknown => "Unknown",
810                 Self::Shutdown => "Shutdown",
811                 Self::Network => "Network",
812                 Self::Multidisk => "Multidisk",
813                 Self::Password => "Password",
814                 _ => "Unknown",
815             }
816         )
817     }
818 }
819 
820 #[doc(hidden)]
821 impl IntoGlib for DriveStartStopType {
822     type GlibType = ffi::GDriveStartStopType;
823 
into_glib(self) -> ffi::GDriveStartStopType824     fn into_glib(self) -> ffi::GDriveStartStopType {
825         match self {
826             Self::Unknown => ffi::G_DRIVE_START_STOP_TYPE_UNKNOWN,
827             Self::Shutdown => ffi::G_DRIVE_START_STOP_TYPE_SHUTDOWN,
828             Self::Network => ffi::G_DRIVE_START_STOP_TYPE_NETWORK,
829             Self::Multidisk => ffi::G_DRIVE_START_STOP_TYPE_MULTIDISK,
830             Self::Password => ffi::G_DRIVE_START_STOP_TYPE_PASSWORD,
831             Self::__Unknown(value) => value,
832         }
833     }
834 }
835 
836 #[doc(hidden)]
837 impl FromGlib<ffi::GDriveStartStopType> for DriveStartStopType {
from_glib(value: ffi::GDriveStartStopType) -> Self838     unsafe fn from_glib(value: ffi::GDriveStartStopType) -> Self {
839         match value {
840             ffi::G_DRIVE_START_STOP_TYPE_UNKNOWN => Self::Unknown,
841             ffi::G_DRIVE_START_STOP_TYPE_SHUTDOWN => Self::Shutdown,
842             ffi::G_DRIVE_START_STOP_TYPE_NETWORK => Self::Network,
843             ffi::G_DRIVE_START_STOP_TYPE_MULTIDISK => Self::Multidisk,
844             ffi::G_DRIVE_START_STOP_TYPE_PASSWORD => Self::Password,
845             value => Self::__Unknown(value),
846         }
847     }
848 }
849 
850 impl StaticType for DriveStartStopType {
static_type() -> Type851     fn static_type() -> Type {
852         unsafe { from_glib(ffi::g_drive_start_stop_type_get_type()) }
853     }
854 }
855 
856 impl glib::value::ValueType for DriveStartStopType {
857     type Type = Self;
858 }
859 
860 unsafe impl<'a> FromValue<'a> for DriveStartStopType {
861     type Checker = glib::value::GenericValueTypeChecker<Self>;
862 
from_value(value: &'a glib::Value) -> Self863     unsafe fn from_value(value: &'a glib::Value) -> Self {
864         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
865     }
866 }
867 
868 impl ToValue for DriveStartStopType {
to_value(&self) -> glib::Value869     fn to_value(&self) -> glib::Value {
870         let mut value = glib::Value::for_value_type::<Self>();
871         unsafe {
872             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
873         }
874         value
875     }
876 
value_type(&self) -> glib::Type877     fn value_type(&self) -> glib::Type {
878         Self::static_type()
879     }
880 }
881 
882 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
883 #[non_exhaustive]
884 #[doc(alias = "GEmblemOrigin")]
885 pub enum EmblemOrigin {
886     #[doc(alias = "G_EMBLEM_ORIGIN_UNKNOWN")]
887     Unknown,
888     #[doc(alias = "G_EMBLEM_ORIGIN_DEVICE")]
889     Device,
890     #[doc(alias = "G_EMBLEM_ORIGIN_LIVEMETADATA")]
891     Livemetadata,
892     #[doc(alias = "G_EMBLEM_ORIGIN_TAG")]
893     Tag,
894     #[doc(hidden)]
895     __Unknown(i32),
896 }
897 
898 impl fmt::Display for EmblemOrigin {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result899     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
900         write!(
901             f,
902             "EmblemOrigin::{}",
903             match *self {
904                 Self::Unknown => "Unknown",
905                 Self::Device => "Device",
906                 Self::Livemetadata => "Livemetadata",
907                 Self::Tag => "Tag",
908                 _ => "Unknown",
909             }
910         )
911     }
912 }
913 
914 #[doc(hidden)]
915 impl IntoGlib for EmblemOrigin {
916     type GlibType = ffi::GEmblemOrigin;
917 
into_glib(self) -> ffi::GEmblemOrigin918     fn into_glib(self) -> ffi::GEmblemOrigin {
919         match self {
920             Self::Unknown => ffi::G_EMBLEM_ORIGIN_UNKNOWN,
921             Self::Device => ffi::G_EMBLEM_ORIGIN_DEVICE,
922             Self::Livemetadata => ffi::G_EMBLEM_ORIGIN_LIVEMETADATA,
923             Self::Tag => ffi::G_EMBLEM_ORIGIN_TAG,
924             Self::__Unknown(value) => value,
925         }
926     }
927 }
928 
929 #[doc(hidden)]
930 impl FromGlib<ffi::GEmblemOrigin> for EmblemOrigin {
from_glib(value: ffi::GEmblemOrigin) -> Self931     unsafe fn from_glib(value: ffi::GEmblemOrigin) -> Self {
932         match value {
933             ffi::G_EMBLEM_ORIGIN_UNKNOWN => Self::Unknown,
934             ffi::G_EMBLEM_ORIGIN_DEVICE => Self::Device,
935             ffi::G_EMBLEM_ORIGIN_LIVEMETADATA => Self::Livemetadata,
936             ffi::G_EMBLEM_ORIGIN_TAG => Self::Tag,
937             value => Self::__Unknown(value),
938         }
939     }
940 }
941 
942 impl StaticType for EmblemOrigin {
static_type() -> Type943     fn static_type() -> Type {
944         unsafe { from_glib(ffi::g_emblem_origin_get_type()) }
945     }
946 }
947 
948 impl glib::value::ValueType for EmblemOrigin {
949     type Type = Self;
950 }
951 
952 unsafe impl<'a> FromValue<'a> for EmblemOrigin {
953     type Checker = glib::value::GenericValueTypeChecker<Self>;
954 
from_value(value: &'a glib::Value) -> Self955     unsafe fn from_value(value: &'a glib::Value) -> Self {
956         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
957     }
958 }
959 
960 impl ToValue for EmblemOrigin {
to_value(&self) -> glib::Value961     fn to_value(&self) -> glib::Value {
962         let mut value = glib::Value::for_value_type::<Self>();
963         unsafe {
964             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
965         }
966         value
967     }
968 
value_type(&self) -> glib::Type969     fn value_type(&self) -> glib::Type {
970         Self::static_type()
971     }
972 }
973 
974 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
975 #[non_exhaustive]
976 #[doc(alias = "GFileAttributeStatus")]
977 pub enum FileAttributeStatus {
978     #[doc(alias = "G_FILE_ATTRIBUTE_STATUS_UNSET")]
979     Unset,
980     #[doc(alias = "G_FILE_ATTRIBUTE_STATUS_SET")]
981     Set,
982     #[doc(alias = "G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING")]
983     ErrorSetting,
984     #[doc(hidden)]
985     __Unknown(i32),
986 }
987 
988 impl fmt::Display for FileAttributeStatus {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result989     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
990         write!(
991             f,
992             "FileAttributeStatus::{}",
993             match *self {
994                 Self::Unset => "Unset",
995                 Self::Set => "Set",
996                 Self::ErrorSetting => "ErrorSetting",
997                 _ => "Unknown",
998             }
999         )
1000     }
1001 }
1002 
1003 #[doc(hidden)]
1004 impl IntoGlib for FileAttributeStatus {
1005     type GlibType = ffi::GFileAttributeStatus;
1006 
into_glib(self) -> ffi::GFileAttributeStatus1007     fn into_glib(self) -> ffi::GFileAttributeStatus {
1008         match self {
1009             Self::Unset => ffi::G_FILE_ATTRIBUTE_STATUS_UNSET,
1010             Self::Set => ffi::G_FILE_ATTRIBUTE_STATUS_SET,
1011             Self::ErrorSetting => ffi::G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING,
1012             Self::__Unknown(value) => value,
1013         }
1014     }
1015 }
1016 
1017 #[doc(hidden)]
1018 impl FromGlib<ffi::GFileAttributeStatus> for FileAttributeStatus {
from_glib(value: ffi::GFileAttributeStatus) -> Self1019     unsafe fn from_glib(value: ffi::GFileAttributeStatus) -> Self {
1020         match value {
1021             ffi::G_FILE_ATTRIBUTE_STATUS_UNSET => Self::Unset,
1022             ffi::G_FILE_ATTRIBUTE_STATUS_SET => Self::Set,
1023             ffi::G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING => Self::ErrorSetting,
1024             value => Self::__Unknown(value),
1025         }
1026     }
1027 }
1028 
1029 impl StaticType for FileAttributeStatus {
static_type() -> Type1030     fn static_type() -> Type {
1031         unsafe { from_glib(ffi::g_file_attribute_status_get_type()) }
1032     }
1033 }
1034 
1035 impl glib::value::ValueType for FileAttributeStatus {
1036     type Type = Self;
1037 }
1038 
1039 unsafe impl<'a> FromValue<'a> for FileAttributeStatus {
1040     type Checker = glib::value::GenericValueTypeChecker<Self>;
1041 
from_value(value: &'a glib::Value) -> Self1042     unsafe fn from_value(value: &'a glib::Value) -> Self {
1043         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1044     }
1045 }
1046 
1047 impl ToValue for FileAttributeStatus {
to_value(&self) -> glib::Value1048     fn to_value(&self) -> glib::Value {
1049         let mut value = glib::Value::for_value_type::<Self>();
1050         unsafe {
1051             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1052         }
1053         value
1054     }
1055 
value_type(&self) -> glib::Type1056     fn value_type(&self) -> glib::Type {
1057         Self::static_type()
1058     }
1059 }
1060 
1061 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1062 #[non_exhaustive]
1063 #[doc(alias = "GFileAttributeType")]
1064 pub enum FileAttributeType {
1065     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_INVALID")]
1066     Invalid,
1067     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_STRING")]
1068     String,
1069     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_BYTE_STRING")]
1070     ByteString,
1071     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_BOOLEAN")]
1072     Boolean,
1073     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_UINT32")]
1074     Uint32,
1075     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_INT32")]
1076     Int32,
1077     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_UINT64")]
1078     Uint64,
1079     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_INT64")]
1080     Int64,
1081     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_OBJECT")]
1082     Object,
1083     #[doc(alias = "G_FILE_ATTRIBUTE_TYPE_STRINGV")]
1084     Stringv,
1085     #[doc(hidden)]
1086     __Unknown(i32),
1087 }
1088 
1089 impl fmt::Display for FileAttributeType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1090     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1091         write!(
1092             f,
1093             "FileAttributeType::{}",
1094             match *self {
1095                 Self::Invalid => "Invalid",
1096                 Self::String => "String",
1097                 Self::ByteString => "ByteString",
1098                 Self::Boolean => "Boolean",
1099                 Self::Uint32 => "Uint32",
1100                 Self::Int32 => "Int32",
1101                 Self::Uint64 => "Uint64",
1102                 Self::Int64 => "Int64",
1103                 Self::Object => "Object",
1104                 Self::Stringv => "Stringv",
1105                 _ => "Unknown",
1106             }
1107         )
1108     }
1109 }
1110 
1111 #[doc(hidden)]
1112 impl IntoGlib for FileAttributeType {
1113     type GlibType = ffi::GFileAttributeType;
1114 
into_glib(self) -> ffi::GFileAttributeType1115     fn into_glib(self) -> ffi::GFileAttributeType {
1116         match self {
1117             Self::Invalid => ffi::G_FILE_ATTRIBUTE_TYPE_INVALID,
1118             Self::String => ffi::G_FILE_ATTRIBUTE_TYPE_STRING,
1119             Self::ByteString => ffi::G_FILE_ATTRIBUTE_TYPE_BYTE_STRING,
1120             Self::Boolean => ffi::G_FILE_ATTRIBUTE_TYPE_BOOLEAN,
1121             Self::Uint32 => ffi::G_FILE_ATTRIBUTE_TYPE_UINT32,
1122             Self::Int32 => ffi::G_FILE_ATTRIBUTE_TYPE_INT32,
1123             Self::Uint64 => ffi::G_FILE_ATTRIBUTE_TYPE_UINT64,
1124             Self::Int64 => ffi::G_FILE_ATTRIBUTE_TYPE_INT64,
1125             Self::Object => ffi::G_FILE_ATTRIBUTE_TYPE_OBJECT,
1126             Self::Stringv => ffi::G_FILE_ATTRIBUTE_TYPE_STRINGV,
1127             Self::__Unknown(value) => value,
1128         }
1129     }
1130 }
1131 
1132 #[doc(hidden)]
1133 impl FromGlib<ffi::GFileAttributeType> for FileAttributeType {
from_glib(value: ffi::GFileAttributeType) -> Self1134     unsafe fn from_glib(value: ffi::GFileAttributeType) -> Self {
1135         match value {
1136             ffi::G_FILE_ATTRIBUTE_TYPE_INVALID => Self::Invalid,
1137             ffi::G_FILE_ATTRIBUTE_TYPE_STRING => Self::String,
1138             ffi::G_FILE_ATTRIBUTE_TYPE_BYTE_STRING => Self::ByteString,
1139             ffi::G_FILE_ATTRIBUTE_TYPE_BOOLEAN => Self::Boolean,
1140             ffi::G_FILE_ATTRIBUTE_TYPE_UINT32 => Self::Uint32,
1141             ffi::G_FILE_ATTRIBUTE_TYPE_INT32 => Self::Int32,
1142             ffi::G_FILE_ATTRIBUTE_TYPE_UINT64 => Self::Uint64,
1143             ffi::G_FILE_ATTRIBUTE_TYPE_INT64 => Self::Int64,
1144             ffi::G_FILE_ATTRIBUTE_TYPE_OBJECT => Self::Object,
1145             ffi::G_FILE_ATTRIBUTE_TYPE_STRINGV => Self::Stringv,
1146             value => Self::__Unknown(value),
1147         }
1148     }
1149 }
1150 
1151 impl StaticType for FileAttributeType {
static_type() -> Type1152     fn static_type() -> Type {
1153         unsafe { from_glib(ffi::g_file_attribute_type_get_type()) }
1154     }
1155 }
1156 
1157 impl glib::value::ValueType for FileAttributeType {
1158     type Type = Self;
1159 }
1160 
1161 unsafe impl<'a> FromValue<'a> for FileAttributeType {
1162     type Checker = glib::value::GenericValueTypeChecker<Self>;
1163 
from_value(value: &'a glib::Value) -> Self1164     unsafe fn from_value(value: &'a glib::Value) -> Self {
1165         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1166     }
1167 }
1168 
1169 impl ToValue for FileAttributeType {
to_value(&self) -> glib::Value1170     fn to_value(&self) -> glib::Value {
1171         let mut value = glib::Value::for_value_type::<Self>();
1172         unsafe {
1173             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1174         }
1175         value
1176     }
1177 
value_type(&self) -> glib::Type1178     fn value_type(&self) -> glib::Type {
1179         Self::static_type()
1180     }
1181 }
1182 
1183 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1184 #[non_exhaustive]
1185 #[doc(alias = "GFileMonitorEvent")]
1186 pub enum FileMonitorEvent {
1187     #[doc(alias = "G_FILE_MONITOR_EVENT_CHANGED")]
1188     Changed,
1189     #[doc(alias = "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT")]
1190     ChangesDoneHint,
1191     #[doc(alias = "G_FILE_MONITOR_EVENT_DELETED")]
1192     Deleted,
1193     #[doc(alias = "G_FILE_MONITOR_EVENT_CREATED")]
1194     Created,
1195     #[doc(alias = "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED")]
1196     AttributeChanged,
1197     #[doc(alias = "G_FILE_MONITOR_EVENT_PRE_UNMOUNT")]
1198     PreUnmount,
1199     #[doc(alias = "G_FILE_MONITOR_EVENT_UNMOUNTED")]
1200     Unmounted,
1201     #[doc(alias = "G_FILE_MONITOR_EVENT_MOVED")]
1202     Moved,
1203     #[doc(alias = "G_FILE_MONITOR_EVENT_RENAMED")]
1204     Renamed,
1205     #[doc(alias = "G_FILE_MONITOR_EVENT_MOVED_IN")]
1206     MovedIn,
1207     #[doc(alias = "G_FILE_MONITOR_EVENT_MOVED_OUT")]
1208     MovedOut,
1209     #[doc(hidden)]
1210     __Unknown(i32),
1211 }
1212 
1213 impl fmt::Display for FileMonitorEvent {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1214     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1215         write!(
1216             f,
1217             "FileMonitorEvent::{}",
1218             match *self {
1219                 Self::Changed => "Changed",
1220                 Self::ChangesDoneHint => "ChangesDoneHint",
1221                 Self::Deleted => "Deleted",
1222                 Self::Created => "Created",
1223                 Self::AttributeChanged => "AttributeChanged",
1224                 Self::PreUnmount => "PreUnmount",
1225                 Self::Unmounted => "Unmounted",
1226                 Self::Moved => "Moved",
1227                 Self::Renamed => "Renamed",
1228                 Self::MovedIn => "MovedIn",
1229                 Self::MovedOut => "MovedOut",
1230                 _ => "Unknown",
1231             }
1232         )
1233     }
1234 }
1235 
1236 #[doc(hidden)]
1237 impl IntoGlib for FileMonitorEvent {
1238     type GlibType = ffi::GFileMonitorEvent;
1239 
into_glib(self) -> ffi::GFileMonitorEvent1240     fn into_glib(self) -> ffi::GFileMonitorEvent {
1241         match self {
1242             Self::Changed => ffi::G_FILE_MONITOR_EVENT_CHANGED,
1243             Self::ChangesDoneHint => ffi::G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT,
1244             Self::Deleted => ffi::G_FILE_MONITOR_EVENT_DELETED,
1245             Self::Created => ffi::G_FILE_MONITOR_EVENT_CREATED,
1246             Self::AttributeChanged => ffi::G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED,
1247             Self::PreUnmount => ffi::G_FILE_MONITOR_EVENT_PRE_UNMOUNT,
1248             Self::Unmounted => ffi::G_FILE_MONITOR_EVENT_UNMOUNTED,
1249             Self::Moved => ffi::G_FILE_MONITOR_EVENT_MOVED,
1250             Self::Renamed => ffi::G_FILE_MONITOR_EVENT_RENAMED,
1251             Self::MovedIn => ffi::G_FILE_MONITOR_EVENT_MOVED_IN,
1252             Self::MovedOut => ffi::G_FILE_MONITOR_EVENT_MOVED_OUT,
1253             Self::__Unknown(value) => value,
1254         }
1255     }
1256 }
1257 
1258 #[doc(hidden)]
1259 impl FromGlib<ffi::GFileMonitorEvent> for FileMonitorEvent {
from_glib(value: ffi::GFileMonitorEvent) -> Self1260     unsafe fn from_glib(value: ffi::GFileMonitorEvent) -> Self {
1261         match value {
1262             ffi::G_FILE_MONITOR_EVENT_CHANGED => Self::Changed,
1263             ffi::G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT => Self::ChangesDoneHint,
1264             ffi::G_FILE_MONITOR_EVENT_DELETED => Self::Deleted,
1265             ffi::G_FILE_MONITOR_EVENT_CREATED => Self::Created,
1266             ffi::G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED => Self::AttributeChanged,
1267             ffi::G_FILE_MONITOR_EVENT_PRE_UNMOUNT => Self::PreUnmount,
1268             ffi::G_FILE_MONITOR_EVENT_UNMOUNTED => Self::Unmounted,
1269             ffi::G_FILE_MONITOR_EVENT_MOVED => Self::Moved,
1270             ffi::G_FILE_MONITOR_EVENT_RENAMED => Self::Renamed,
1271             ffi::G_FILE_MONITOR_EVENT_MOVED_IN => Self::MovedIn,
1272             ffi::G_FILE_MONITOR_EVENT_MOVED_OUT => Self::MovedOut,
1273             value => Self::__Unknown(value),
1274         }
1275     }
1276 }
1277 
1278 impl StaticType for FileMonitorEvent {
static_type() -> Type1279     fn static_type() -> Type {
1280         unsafe { from_glib(ffi::g_file_monitor_event_get_type()) }
1281     }
1282 }
1283 
1284 impl glib::value::ValueType for FileMonitorEvent {
1285     type Type = Self;
1286 }
1287 
1288 unsafe impl<'a> FromValue<'a> for FileMonitorEvent {
1289     type Checker = glib::value::GenericValueTypeChecker<Self>;
1290 
from_value(value: &'a glib::Value) -> Self1291     unsafe fn from_value(value: &'a glib::Value) -> Self {
1292         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1293     }
1294 }
1295 
1296 impl ToValue for FileMonitorEvent {
to_value(&self) -> glib::Value1297     fn to_value(&self) -> glib::Value {
1298         let mut value = glib::Value::for_value_type::<Self>();
1299         unsafe {
1300             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1301         }
1302         value
1303     }
1304 
value_type(&self) -> glib::Type1305     fn value_type(&self) -> glib::Type {
1306         Self::static_type()
1307     }
1308 }
1309 
1310 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1311 #[non_exhaustive]
1312 #[doc(alias = "GFileType")]
1313 pub enum FileType {
1314     #[doc(alias = "G_FILE_TYPE_UNKNOWN")]
1315     Unknown,
1316     #[doc(alias = "G_FILE_TYPE_REGULAR")]
1317     Regular,
1318     #[doc(alias = "G_FILE_TYPE_DIRECTORY")]
1319     Directory,
1320     #[doc(alias = "G_FILE_TYPE_SYMBOLIC_LINK")]
1321     SymbolicLink,
1322     #[doc(alias = "G_FILE_TYPE_SPECIAL")]
1323     Special,
1324     #[doc(alias = "G_FILE_TYPE_SHORTCUT")]
1325     Shortcut,
1326     #[doc(alias = "G_FILE_TYPE_MOUNTABLE")]
1327     Mountable,
1328     #[doc(hidden)]
1329     __Unknown(i32),
1330 }
1331 
1332 impl fmt::Display for FileType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1333     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1334         write!(
1335             f,
1336             "FileType::{}",
1337             match *self {
1338                 Self::Unknown => "Unknown",
1339                 Self::Regular => "Regular",
1340                 Self::Directory => "Directory",
1341                 Self::SymbolicLink => "SymbolicLink",
1342                 Self::Special => "Special",
1343                 Self::Shortcut => "Shortcut",
1344                 Self::Mountable => "Mountable",
1345                 _ => "Unknown",
1346             }
1347         )
1348     }
1349 }
1350 
1351 #[doc(hidden)]
1352 impl IntoGlib for FileType {
1353     type GlibType = ffi::GFileType;
1354 
into_glib(self) -> ffi::GFileType1355     fn into_glib(self) -> ffi::GFileType {
1356         match self {
1357             Self::Unknown => ffi::G_FILE_TYPE_UNKNOWN,
1358             Self::Regular => ffi::G_FILE_TYPE_REGULAR,
1359             Self::Directory => ffi::G_FILE_TYPE_DIRECTORY,
1360             Self::SymbolicLink => ffi::G_FILE_TYPE_SYMBOLIC_LINK,
1361             Self::Special => ffi::G_FILE_TYPE_SPECIAL,
1362             Self::Shortcut => ffi::G_FILE_TYPE_SHORTCUT,
1363             Self::Mountable => ffi::G_FILE_TYPE_MOUNTABLE,
1364             Self::__Unknown(value) => value,
1365         }
1366     }
1367 }
1368 
1369 #[doc(hidden)]
1370 impl FromGlib<ffi::GFileType> for FileType {
from_glib(value: ffi::GFileType) -> Self1371     unsafe fn from_glib(value: ffi::GFileType) -> Self {
1372         match value {
1373             ffi::G_FILE_TYPE_UNKNOWN => Self::Unknown,
1374             ffi::G_FILE_TYPE_REGULAR => Self::Regular,
1375             ffi::G_FILE_TYPE_DIRECTORY => Self::Directory,
1376             ffi::G_FILE_TYPE_SYMBOLIC_LINK => Self::SymbolicLink,
1377             ffi::G_FILE_TYPE_SPECIAL => Self::Special,
1378             ffi::G_FILE_TYPE_SHORTCUT => Self::Shortcut,
1379             ffi::G_FILE_TYPE_MOUNTABLE => Self::Mountable,
1380             value => Self::__Unknown(value),
1381         }
1382     }
1383 }
1384 
1385 impl StaticType for FileType {
static_type() -> Type1386     fn static_type() -> Type {
1387         unsafe { from_glib(ffi::g_file_type_get_type()) }
1388     }
1389 }
1390 
1391 impl glib::value::ValueType for FileType {
1392     type Type = Self;
1393 }
1394 
1395 unsafe impl<'a> FromValue<'a> for FileType {
1396     type Checker = glib::value::GenericValueTypeChecker<Self>;
1397 
from_value(value: &'a glib::Value) -> Self1398     unsafe fn from_value(value: &'a glib::Value) -> Self {
1399         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1400     }
1401 }
1402 
1403 impl ToValue for FileType {
to_value(&self) -> glib::Value1404     fn to_value(&self) -> glib::Value {
1405         let mut value = glib::Value::for_value_type::<Self>();
1406         unsafe {
1407             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1408         }
1409         value
1410     }
1411 
value_type(&self) -> glib::Type1412     fn value_type(&self) -> glib::Type {
1413         Self::static_type()
1414     }
1415 }
1416 
1417 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1418 #[non_exhaustive]
1419 #[doc(alias = "GIOErrorEnum")]
1420 pub enum IOErrorEnum {
1421     #[doc(alias = "G_IO_ERROR_FAILED")]
1422     Failed,
1423     #[doc(alias = "G_IO_ERROR_NOT_FOUND")]
1424     NotFound,
1425     #[doc(alias = "G_IO_ERROR_EXISTS")]
1426     Exists,
1427     #[doc(alias = "G_IO_ERROR_IS_DIRECTORY")]
1428     IsDirectory,
1429     #[doc(alias = "G_IO_ERROR_NOT_DIRECTORY")]
1430     NotDirectory,
1431     #[doc(alias = "G_IO_ERROR_NOT_EMPTY")]
1432     NotEmpty,
1433     #[doc(alias = "G_IO_ERROR_NOT_REGULAR_FILE")]
1434     NotRegularFile,
1435     #[doc(alias = "G_IO_ERROR_NOT_SYMBOLIC_LINK")]
1436     NotSymbolicLink,
1437     #[doc(alias = "G_IO_ERROR_NOT_MOUNTABLE_FILE")]
1438     NotMountableFile,
1439     #[doc(alias = "G_IO_ERROR_FILENAME_TOO_LONG")]
1440     FilenameTooLong,
1441     #[doc(alias = "G_IO_ERROR_INVALID_FILENAME")]
1442     InvalidFilename,
1443     #[doc(alias = "G_IO_ERROR_TOO_MANY_LINKS")]
1444     TooManyLinks,
1445     #[doc(alias = "G_IO_ERROR_NO_SPACE")]
1446     NoSpace,
1447     #[doc(alias = "G_IO_ERROR_INVALID_ARGUMENT")]
1448     InvalidArgument,
1449     #[doc(alias = "G_IO_ERROR_PERMISSION_DENIED")]
1450     PermissionDenied,
1451     #[doc(alias = "G_IO_ERROR_NOT_SUPPORTED")]
1452     NotSupported,
1453     #[doc(alias = "G_IO_ERROR_NOT_MOUNTED")]
1454     NotMounted,
1455     #[doc(alias = "G_IO_ERROR_ALREADY_MOUNTED")]
1456     AlreadyMounted,
1457     #[doc(alias = "G_IO_ERROR_CLOSED")]
1458     Closed,
1459     #[doc(alias = "G_IO_ERROR_CANCELLED")]
1460     Cancelled,
1461     #[doc(alias = "G_IO_ERROR_PENDING")]
1462     Pending,
1463     #[doc(alias = "G_IO_ERROR_READ_ONLY")]
1464     ReadOnly,
1465     #[doc(alias = "G_IO_ERROR_CANT_CREATE_BACKUP")]
1466     CantCreateBackup,
1467     #[doc(alias = "G_IO_ERROR_WRONG_ETAG")]
1468     WrongEtag,
1469     #[doc(alias = "G_IO_ERROR_TIMED_OUT")]
1470     TimedOut,
1471     #[doc(alias = "G_IO_ERROR_WOULD_RECURSE")]
1472     WouldRecurse,
1473     #[doc(alias = "G_IO_ERROR_BUSY")]
1474     Busy,
1475     #[doc(alias = "G_IO_ERROR_WOULD_BLOCK")]
1476     WouldBlock,
1477     #[doc(alias = "G_IO_ERROR_HOST_NOT_FOUND")]
1478     HostNotFound,
1479     #[doc(alias = "G_IO_ERROR_WOULD_MERGE")]
1480     WouldMerge,
1481     #[doc(alias = "G_IO_ERROR_FAILED_HANDLED")]
1482     FailedHandled,
1483     #[doc(alias = "G_IO_ERROR_TOO_MANY_OPEN_FILES")]
1484     TooManyOpenFiles,
1485     #[doc(alias = "G_IO_ERROR_NOT_INITIALIZED")]
1486     NotInitialized,
1487     #[doc(alias = "G_IO_ERROR_ADDRESS_IN_USE")]
1488     AddressInUse,
1489     #[doc(alias = "G_IO_ERROR_PARTIAL_INPUT")]
1490     PartialInput,
1491     #[doc(alias = "G_IO_ERROR_INVALID_DATA")]
1492     InvalidData,
1493     #[doc(alias = "G_IO_ERROR_DBUS_ERROR")]
1494     DbusError,
1495     #[doc(alias = "G_IO_ERROR_HOST_UNREACHABLE")]
1496     HostUnreachable,
1497     #[doc(alias = "G_IO_ERROR_NETWORK_UNREACHABLE")]
1498     NetworkUnreachable,
1499     #[doc(alias = "G_IO_ERROR_CONNECTION_REFUSED")]
1500     ConnectionRefused,
1501     #[doc(alias = "G_IO_ERROR_PROXY_FAILED")]
1502     ProxyFailed,
1503     #[doc(alias = "G_IO_ERROR_PROXY_AUTH_FAILED")]
1504     ProxyAuthFailed,
1505     #[doc(alias = "G_IO_ERROR_PROXY_NEED_AUTH")]
1506     ProxyNeedAuth,
1507     #[doc(alias = "G_IO_ERROR_PROXY_NOT_ALLOWED")]
1508     ProxyNotAllowed,
1509     #[doc(alias = "G_IO_ERROR_BROKEN_PIPE")]
1510     BrokenPipe,
1511     #[doc(alias = "G_IO_ERROR_NOT_CONNECTED")]
1512     NotConnected,
1513     #[doc(alias = "G_IO_ERROR_MESSAGE_TOO_LARGE")]
1514     MessageTooLarge,
1515     #[doc(hidden)]
1516     __Unknown(i32),
1517 }
1518 
1519 impl fmt::Display for IOErrorEnum {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1520     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1521         write!(
1522             f,
1523             "IOErrorEnum::{}",
1524             match *self {
1525                 Self::Failed => "Failed",
1526                 Self::NotFound => "NotFound",
1527                 Self::Exists => "Exists",
1528                 Self::IsDirectory => "IsDirectory",
1529                 Self::NotDirectory => "NotDirectory",
1530                 Self::NotEmpty => "NotEmpty",
1531                 Self::NotRegularFile => "NotRegularFile",
1532                 Self::NotSymbolicLink => "NotSymbolicLink",
1533                 Self::NotMountableFile => "NotMountableFile",
1534                 Self::FilenameTooLong => "FilenameTooLong",
1535                 Self::InvalidFilename => "InvalidFilename",
1536                 Self::TooManyLinks => "TooManyLinks",
1537                 Self::NoSpace => "NoSpace",
1538                 Self::InvalidArgument => "InvalidArgument",
1539                 Self::PermissionDenied => "PermissionDenied",
1540                 Self::NotSupported => "NotSupported",
1541                 Self::NotMounted => "NotMounted",
1542                 Self::AlreadyMounted => "AlreadyMounted",
1543                 Self::Closed => "Closed",
1544                 Self::Cancelled => "Cancelled",
1545                 Self::Pending => "Pending",
1546                 Self::ReadOnly => "ReadOnly",
1547                 Self::CantCreateBackup => "CantCreateBackup",
1548                 Self::WrongEtag => "WrongEtag",
1549                 Self::TimedOut => "TimedOut",
1550                 Self::WouldRecurse => "WouldRecurse",
1551                 Self::Busy => "Busy",
1552                 Self::WouldBlock => "WouldBlock",
1553                 Self::HostNotFound => "HostNotFound",
1554                 Self::WouldMerge => "WouldMerge",
1555                 Self::FailedHandled => "FailedHandled",
1556                 Self::TooManyOpenFiles => "TooManyOpenFiles",
1557                 Self::NotInitialized => "NotInitialized",
1558                 Self::AddressInUse => "AddressInUse",
1559                 Self::PartialInput => "PartialInput",
1560                 Self::InvalidData => "InvalidData",
1561                 Self::DbusError => "DbusError",
1562                 Self::HostUnreachable => "HostUnreachable",
1563                 Self::NetworkUnreachable => "NetworkUnreachable",
1564                 Self::ConnectionRefused => "ConnectionRefused",
1565                 Self::ProxyFailed => "ProxyFailed",
1566                 Self::ProxyAuthFailed => "ProxyAuthFailed",
1567                 Self::ProxyNeedAuth => "ProxyNeedAuth",
1568                 Self::ProxyNotAllowed => "ProxyNotAllowed",
1569                 Self::BrokenPipe => "BrokenPipe",
1570                 Self::NotConnected => "NotConnected",
1571                 Self::MessageTooLarge => "MessageTooLarge",
1572                 _ => "Unknown",
1573             }
1574         )
1575     }
1576 }
1577 
1578 #[doc(hidden)]
1579 impl IntoGlib for IOErrorEnum {
1580     type GlibType = ffi::GIOErrorEnum;
1581 
into_glib(self) -> ffi::GIOErrorEnum1582     fn into_glib(self) -> ffi::GIOErrorEnum {
1583         match self {
1584             Self::Failed => ffi::G_IO_ERROR_FAILED,
1585             Self::NotFound => ffi::G_IO_ERROR_NOT_FOUND,
1586             Self::Exists => ffi::G_IO_ERROR_EXISTS,
1587             Self::IsDirectory => ffi::G_IO_ERROR_IS_DIRECTORY,
1588             Self::NotDirectory => ffi::G_IO_ERROR_NOT_DIRECTORY,
1589             Self::NotEmpty => ffi::G_IO_ERROR_NOT_EMPTY,
1590             Self::NotRegularFile => ffi::G_IO_ERROR_NOT_REGULAR_FILE,
1591             Self::NotSymbolicLink => ffi::G_IO_ERROR_NOT_SYMBOLIC_LINK,
1592             Self::NotMountableFile => ffi::G_IO_ERROR_NOT_MOUNTABLE_FILE,
1593             Self::FilenameTooLong => ffi::G_IO_ERROR_FILENAME_TOO_LONG,
1594             Self::InvalidFilename => ffi::G_IO_ERROR_INVALID_FILENAME,
1595             Self::TooManyLinks => ffi::G_IO_ERROR_TOO_MANY_LINKS,
1596             Self::NoSpace => ffi::G_IO_ERROR_NO_SPACE,
1597             Self::InvalidArgument => ffi::G_IO_ERROR_INVALID_ARGUMENT,
1598             Self::PermissionDenied => ffi::G_IO_ERROR_PERMISSION_DENIED,
1599             Self::NotSupported => ffi::G_IO_ERROR_NOT_SUPPORTED,
1600             Self::NotMounted => ffi::G_IO_ERROR_NOT_MOUNTED,
1601             Self::AlreadyMounted => ffi::G_IO_ERROR_ALREADY_MOUNTED,
1602             Self::Closed => ffi::G_IO_ERROR_CLOSED,
1603             Self::Cancelled => ffi::G_IO_ERROR_CANCELLED,
1604             Self::Pending => ffi::G_IO_ERROR_PENDING,
1605             Self::ReadOnly => ffi::G_IO_ERROR_READ_ONLY,
1606             Self::CantCreateBackup => ffi::G_IO_ERROR_CANT_CREATE_BACKUP,
1607             Self::WrongEtag => ffi::G_IO_ERROR_WRONG_ETAG,
1608             Self::TimedOut => ffi::G_IO_ERROR_TIMED_OUT,
1609             Self::WouldRecurse => ffi::G_IO_ERROR_WOULD_RECURSE,
1610             Self::Busy => ffi::G_IO_ERROR_BUSY,
1611             Self::WouldBlock => ffi::G_IO_ERROR_WOULD_BLOCK,
1612             Self::HostNotFound => ffi::G_IO_ERROR_HOST_NOT_FOUND,
1613             Self::WouldMerge => ffi::G_IO_ERROR_WOULD_MERGE,
1614             Self::FailedHandled => ffi::G_IO_ERROR_FAILED_HANDLED,
1615             Self::TooManyOpenFiles => ffi::G_IO_ERROR_TOO_MANY_OPEN_FILES,
1616             Self::NotInitialized => ffi::G_IO_ERROR_NOT_INITIALIZED,
1617             Self::AddressInUse => ffi::G_IO_ERROR_ADDRESS_IN_USE,
1618             Self::PartialInput => ffi::G_IO_ERROR_PARTIAL_INPUT,
1619             Self::InvalidData => ffi::G_IO_ERROR_INVALID_DATA,
1620             Self::DbusError => ffi::G_IO_ERROR_DBUS_ERROR,
1621             Self::HostUnreachable => ffi::G_IO_ERROR_HOST_UNREACHABLE,
1622             Self::NetworkUnreachable => ffi::G_IO_ERROR_NETWORK_UNREACHABLE,
1623             Self::ConnectionRefused => ffi::G_IO_ERROR_CONNECTION_REFUSED,
1624             Self::ProxyFailed => ffi::G_IO_ERROR_PROXY_FAILED,
1625             Self::ProxyAuthFailed => ffi::G_IO_ERROR_PROXY_AUTH_FAILED,
1626             Self::ProxyNeedAuth => ffi::G_IO_ERROR_PROXY_NEED_AUTH,
1627             Self::ProxyNotAllowed => ffi::G_IO_ERROR_PROXY_NOT_ALLOWED,
1628             Self::BrokenPipe => ffi::G_IO_ERROR_BROKEN_PIPE,
1629             Self::NotConnected => ffi::G_IO_ERROR_NOT_CONNECTED,
1630             Self::MessageTooLarge => ffi::G_IO_ERROR_MESSAGE_TOO_LARGE,
1631             Self::__Unknown(value) => value,
1632         }
1633     }
1634 }
1635 
1636 #[doc(hidden)]
1637 impl FromGlib<ffi::GIOErrorEnum> for IOErrorEnum {
from_glib(value: ffi::GIOErrorEnum) -> Self1638     unsafe fn from_glib(value: ffi::GIOErrorEnum) -> Self {
1639         match value {
1640             ffi::G_IO_ERROR_FAILED => Self::Failed,
1641             ffi::G_IO_ERROR_NOT_FOUND => Self::NotFound,
1642             ffi::G_IO_ERROR_EXISTS => Self::Exists,
1643             ffi::G_IO_ERROR_IS_DIRECTORY => Self::IsDirectory,
1644             ffi::G_IO_ERROR_NOT_DIRECTORY => Self::NotDirectory,
1645             ffi::G_IO_ERROR_NOT_EMPTY => Self::NotEmpty,
1646             ffi::G_IO_ERROR_NOT_REGULAR_FILE => Self::NotRegularFile,
1647             ffi::G_IO_ERROR_NOT_SYMBOLIC_LINK => Self::NotSymbolicLink,
1648             ffi::G_IO_ERROR_NOT_MOUNTABLE_FILE => Self::NotMountableFile,
1649             ffi::G_IO_ERROR_FILENAME_TOO_LONG => Self::FilenameTooLong,
1650             ffi::G_IO_ERROR_INVALID_FILENAME => Self::InvalidFilename,
1651             ffi::G_IO_ERROR_TOO_MANY_LINKS => Self::TooManyLinks,
1652             ffi::G_IO_ERROR_NO_SPACE => Self::NoSpace,
1653             ffi::G_IO_ERROR_INVALID_ARGUMENT => Self::InvalidArgument,
1654             ffi::G_IO_ERROR_PERMISSION_DENIED => Self::PermissionDenied,
1655             ffi::G_IO_ERROR_NOT_SUPPORTED => Self::NotSupported,
1656             ffi::G_IO_ERROR_NOT_MOUNTED => Self::NotMounted,
1657             ffi::G_IO_ERROR_ALREADY_MOUNTED => Self::AlreadyMounted,
1658             ffi::G_IO_ERROR_CLOSED => Self::Closed,
1659             ffi::G_IO_ERROR_CANCELLED => Self::Cancelled,
1660             ffi::G_IO_ERROR_PENDING => Self::Pending,
1661             ffi::G_IO_ERROR_READ_ONLY => Self::ReadOnly,
1662             ffi::G_IO_ERROR_CANT_CREATE_BACKUP => Self::CantCreateBackup,
1663             ffi::G_IO_ERROR_WRONG_ETAG => Self::WrongEtag,
1664             ffi::G_IO_ERROR_TIMED_OUT => Self::TimedOut,
1665             ffi::G_IO_ERROR_WOULD_RECURSE => Self::WouldRecurse,
1666             ffi::G_IO_ERROR_BUSY => Self::Busy,
1667             ffi::G_IO_ERROR_WOULD_BLOCK => Self::WouldBlock,
1668             ffi::G_IO_ERROR_HOST_NOT_FOUND => Self::HostNotFound,
1669             ffi::G_IO_ERROR_WOULD_MERGE => Self::WouldMerge,
1670             ffi::G_IO_ERROR_FAILED_HANDLED => Self::FailedHandled,
1671             ffi::G_IO_ERROR_TOO_MANY_OPEN_FILES => Self::TooManyOpenFiles,
1672             ffi::G_IO_ERROR_NOT_INITIALIZED => Self::NotInitialized,
1673             ffi::G_IO_ERROR_ADDRESS_IN_USE => Self::AddressInUse,
1674             ffi::G_IO_ERROR_PARTIAL_INPUT => Self::PartialInput,
1675             ffi::G_IO_ERROR_INVALID_DATA => Self::InvalidData,
1676             ffi::G_IO_ERROR_DBUS_ERROR => Self::DbusError,
1677             ffi::G_IO_ERROR_HOST_UNREACHABLE => Self::HostUnreachable,
1678             ffi::G_IO_ERROR_NETWORK_UNREACHABLE => Self::NetworkUnreachable,
1679             ffi::G_IO_ERROR_CONNECTION_REFUSED => Self::ConnectionRefused,
1680             ffi::G_IO_ERROR_PROXY_FAILED => Self::ProxyFailed,
1681             ffi::G_IO_ERROR_PROXY_AUTH_FAILED => Self::ProxyAuthFailed,
1682             ffi::G_IO_ERROR_PROXY_NEED_AUTH => Self::ProxyNeedAuth,
1683             ffi::G_IO_ERROR_PROXY_NOT_ALLOWED => Self::ProxyNotAllowed,
1684             ffi::G_IO_ERROR_BROKEN_PIPE => Self::BrokenPipe,
1685             ffi::G_IO_ERROR_NOT_CONNECTED => Self::NotConnected,
1686             ffi::G_IO_ERROR_MESSAGE_TOO_LARGE => Self::MessageTooLarge,
1687             value => Self::__Unknown(value),
1688         }
1689     }
1690 }
1691 
1692 impl ErrorDomain for IOErrorEnum {
domain() -> Quark1693     fn domain() -> Quark {
1694         unsafe { from_glib(ffi::g_io_error_quark()) }
1695     }
1696 
code(self) -> i321697     fn code(self) -> i32 {
1698         self.into_glib()
1699     }
1700 
from(code: i32) -> Option<Self>1701     fn from(code: i32) -> Option<Self> {
1702         match code {
1703             ffi::G_IO_ERROR_FAILED => Some(Self::Failed),
1704             ffi::G_IO_ERROR_NOT_FOUND => Some(Self::NotFound),
1705             ffi::G_IO_ERROR_EXISTS => Some(Self::Exists),
1706             ffi::G_IO_ERROR_IS_DIRECTORY => Some(Self::IsDirectory),
1707             ffi::G_IO_ERROR_NOT_DIRECTORY => Some(Self::NotDirectory),
1708             ffi::G_IO_ERROR_NOT_EMPTY => Some(Self::NotEmpty),
1709             ffi::G_IO_ERROR_NOT_REGULAR_FILE => Some(Self::NotRegularFile),
1710             ffi::G_IO_ERROR_NOT_SYMBOLIC_LINK => Some(Self::NotSymbolicLink),
1711             ffi::G_IO_ERROR_NOT_MOUNTABLE_FILE => Some(Self::NotMountableFile),
1712             ffi::G_IO_ERROR_FILENAME_TOO_LONG => Some(Self::FilenameTooLong),
1713             ffi::G_IO_ERROR_INVALID_FILENAME => Some(Self::InvalidFilename),
1714             ffi::G_IO_ERROR_TOO_MANY_LINKS => Some(Self::TooManyLinks),
1715             ffi::G_IO_ERROR_NO_SPACE => Some(Self::NoSpace),
1716             ffi::G_IO_ERROR_INVALID_ARGUMENT => Some(Self::InvalidArgument),
1717             ffi::G_IO_ERROR_PERMISSION_DENIED => Some(Self::PermissionDenied),
1718             ffi::G_IO_ERROR_NOT_SUPPORTED => Some(Self::NotSupported),
1719             ffi::G_IO_ERROR_NOT_MOUNTED => Some(Self::NotMounted),
1720             ffi::G_IO_ERROR_ALREADY_MOUNTED => Some(Self::AlreadyMounted),
1721             ffi::G_IO_ERROR_CLOSED => Some(Self::Closed),
1722             ffi::G_IO_ERROR_CANCELLED => Some(Self::Cancelled),
1723             ffi::G_IO_ERROR_PENDING => Some(Self::Pending),
1724             ffi::G_IO_ERROR_READ_ONLY => Some(Self::ReadOnly),
1725             ffi::G_IO_ERROR_CANT_CREATE_BACKUP => Some(Self::CantCreateBackup),
1726             ffi::G_IO_ERROR_WRONG_ETAG => Some(Self::WrongEtag),
1727             ffi::G_IO_ERROR_TIMED_OUT => Some(Self::TimedOut),
1728             ffi::G_IO_ERROR_WOULD_RECURSE => Some(Self::WouldRecurse),
1729             ffi::G_IO_ERROR_BUSY => Some(Self::Busy),
1730             ffi::G_IO_ERROR_WOULD_BLOCK => Some(Self::WouldBlock),
1731             ffi::G_IO_ERROR_HOST_NOT_FOUND => Some(Self::HostNotFound),
1732             ffi::G_IO_ERROR_WOULD_MERGE => Some(Self::WouldMerge),
1733             ffi::G_IO_ERROR_FAILED_HANDLED => Some(Self::FailedHandled),
1734             ffi::G_IO_ERROR_TOO_MANY_OPEN_FILES => Some(Self::TooManyOpenFiles),
1735             ffi::G_IO_ERROR_NOT_INITIALIZED => Some(Self::NotInitialized),
1736             ffi::G_IO_ERROR_ADDRESS_IN_USE => Some(Self::AddressInUse),
1737             ffi::G_IO_ERROR_PARTIAL_INPUT => Some(Self::PartialInput),
1738             ffi::G_IO_ERROR_INVALID_DATA => Some(Self::InvalidData),
1739             ffi::G_IO_ERROR_DBUS_ERROR => Some(Self::DbusError),
1740             ffi::G_IO_ERROR_HOST_UNREACHABLE => Some(Self::HostUnreachable),
1741             ffi::G_IO_ERROR_NETWORK_UNREACHABLE => Some(Self::NetworkUnreachable),
1742             ffi::G_IO_ERROR_CONNECTION_REFUSED => Some(Self::ConnectionRefused),
1743             ffi::G_IO_ERROR_PROXY_FAILED => Some(Self::ProxyFailed),
1744             ffi::G_IO_ERROR_PROXY_AUTH_FAILED => Some(Self::ProxyAuthFailed),
1745             ffi::G_IO_ERROR_PROXY_NEED_AUTH => Some(Self::ProxyNeedAuth),
1746             ffi::G_IO_ERROR_PROXY_NOT_ALLOWED => Some(Self::ProxyNotAllowed),
1747             ffi::G_IO_ERROR_BROKEN_PIPE => Some(Self::BrokenPipe),
1748             ffi::G_IO_ERROR_NOT_CONNECTED => Some(Self::NotConnected),
1749             ffi::G_IO_ERROR_MESSAGE_TOO_LARGE => Some(Self::MessageTooLarge),
1750             _ => Some(Self::Failed),
1751         }
1752     }
1753 }
1754 
1755 impl StaticType for IOErrorEnum {
static_type() -> Type1756     fn static_type() -> Type {
1757         unsafe { from_glib(ffi::g_io_error_enum_get_type()) }
1758     }
1759 }
1760 
1761 impl glib::value::ValueType for IOErrorEnum {
1762     type Type = Self;
1763 }
1764 
1765 unsafe impl<'a> FromValue<'a> for IOErrorEnum {
1766     type Checker = glib::value::GenericValueTypeChecker<Self>;
1767 
from_value(value: &'a glib::Value) -> Self1768     unsafe fn from_value(value: &'a glib::Value) -> Self {
1769         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1770     }
1771 }
1772 
1773 impl ToValue for IOErrorEnum {
to_value(&self) -> glib::Value1774     fn to_value(&self) -> glib::Value {
1775         let mut value = glib::Value::for_value_type::<Self>();
1776         unsafe {
1777             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1778         }
1779         value
1780     }
1781 
value_type(&self) -> glib::Type1782     fn value_type(&self) -> glib::Type {
1783         Self::static_type()
1784     }
1785 }
1786 
1787 #[cfg(any(feature = "v2_64", feature = "dox"))]
1788 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1789 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1790 #[non_exhaustive]
1791 #[doc(alias = "GMemoryMonitorWarningLevel")]
1792 pub enum MemoryMonitorWarningLevel {
1793     #[doc(alias = "G_MEMORY_MONITOR_WARNING_LEVEL_LOW")]
1794     Low,
1795     #[doc(alias = "G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM")]
1796     Medium,
1797     #[doc(alias = "G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL")]
1798     Critical,
1799     #[doc(hidden)]
1800     __Unknown(i32),
1801 }
1802 
1803 #[cfg(any(feature = "v2_64", feature = "dox"))]
1804 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1805 impl fmt::Display for MemoryMonitorWarningLevel {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1806     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1807         write!(
1808             f,
1809             "MemoryMonitorWarningLevel::{}",
1810             match *self {
1811                 Self::Low => "Low",
1812                 Self::Medium => "Medium",
1813                 Self::Critical => "Critical",
1814                 _ => "Unknown",
1815             }
1816         )
1817     }
1818 }
1819 
1820 #[cfg(any(feature = "v2_64", feature = "dox"))]
1821 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1822 #[doc(hidden)]
1823 impl IntoGlib for MemoryMonitorWarningLevel {
1824     type GlibType = ffi::GMemoryMonitorWarningLevel;
1825 
into_glib(self) -> ffi::GMemoryMonitorWarningLevel1826     fn into_glib(self) -> ffi::GMemoryMonitorWarningLevel {
1827         match self {
1828             Self::Low => ffi::G_MEMORY_MONITOR_WARNING_LEVEL_LOW,
1829             Self::Medium => ffi::G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM,
1830             Self::Critical => ffi::G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL,
1831             Self::__Unknown(value) => value,
1832         }
1833     }
1834 }
1835 
1836 #[cfg(any(feature = "v2_64", feature = "dox"))]
1837 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1838 #[doc(hidden)]
1839 impl FromGlib<ffi::GMemoryMonitorWarningLevel> for MemoryMonitorWarningLevel {
from_glib(value: ffi::GMemoryMonitorWarningLevel) -> Self1840     unsafe fn from_glib(value: ffi::GMemoryMonitorWarningLevel) -> Self {
1841         match value {
1842             ffi::G_MEMORY_MONITOR_WARNING_LEVEL_LOW => Self::Low,
1843             ffi::G_MEMORY_MONITOR_WARNING_LEVEL_MEDIUM => Self::Medium,
1844             ffi::G_MEMORY_MONITOR_WARNING_LEVEL_CRITICAL => Self::Critical,
1845             value => Self::__Unknown(value),
1846         }
1847     }
1848 }
1849 
1850 #[cfg(any(feature = "v2_64", feature = "dox"))]
1851 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1852 impl StaticType for MemoryMonitorWarningLevel {
static_type() -> Type1853     fn static_type() -> Type {
1854         unsafe { from_glib(ffi::g_memory_monitor_warning_level_get_type()) }
1855     }
1856 }
1857 
1858 #[cfg(any(feature = "v2_64", feature = "dox"))]
1859 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1860 impl glib::value::ValueType for MemoryMonitorWarningLevel {
1861     type Type = Self;
1862 }
1863 
1864 #[cfg(any(feature = "v2_64", feature = "dox"))]
1865 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1866 unsafe impl<'a> FromValue<'a> for MemoryMonitorWarningLevel {
1867     type Checker = glib::value::GenericValueTypeChecker<Self>;
1868 
from_value(value: &'a glib::Value) -> Self1869     unsafe fn from_value(value: &'a glib::Value) -> Self {
1870         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1871     }
1872 }
1873 
1874 #[cfg(any(feature = "v2_64", feature = "dox"))]
1875 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_64")))]
1876 impl ToValue for MemoryMonitorWarningLevel {
to_value(&self) -> glib::Value1877     fn to_value(&self) -> glib::Value {
1878         let mut value = glib::Value::for_value_type::<Self>();
1879         unsafe {
1880             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1881         }
1882         value
1883     }
1884 
value_type(&self) -> glib::Type1885     fn value_type(&self) -> glib::Type {
1886         Self::static_type()
1887     }
1888 }
1889 
1890 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1891 #[non_exhaustive]
1892 #[doc(alias = "GMountOperationResult")]
1893 pub enum MountOperationResult {
1894     #[doc(alias = "G_MOUNT_OPERATION_HANDLED")]
1895     Handled,
1896     #[doc(alias = "G_MOUNT_OPERATION_ABORTED")]
1897     Aborted,
1898     #[doc(alias = "G_MOUNT_OPERATION_UNHANDLED")]
1899     Unhandled,
1900     #[doc(hidden)]
1901     __Unknown(i32),
1902 }
1903 
1904 impl fmt::Display for MountOperationResult {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1905     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1906         write!(
1907             f,
1908             "MountOperationResult::{}",
1909             match *self {
1910                 Self::Handled => "Handled",
1911                 Self::Aborted => "Aborted",
1912                 Self::Unhandled => "Unhandled",
1913                 _ => "Unknown",
1914             }
1915         )
1916     }
1917 }
1918 
1919 #[doc(hidden)]
1920 impl IntoGlib for MountOperationResult {
1921     type GlibType = ffi::GMountOperationResult;
1922 
into_glib(self) -> ffi::GMountOperationResult1923     fn into_glib(self) -> ffi::GMountOperationResult {
1924         match self {
1925             Self::Handled => ffi::G_MOUNT_OPERATION_HANDLED,
1926             Self::Aborted => ffi::G_MOUNT_OPERATION_ABORTED,
1927             Self::Unhandled => ffi::G_MOUNT_OPERATION_UNHANDLED,
1928             Self::__Unknown(value) => value,
1929         }
1930     }
1931 }
1932 
1933 #[doc(hidden)]
1934 impl FromGlib<ffi::GMountOperationResult> for MountOperationResult {
from_glib(value: ffi::GMountOperationResult) -> Self1935     unsafe fn from_glib(value: ffi::GMountOperationResult) -> Self {
1936         match value {
1937             ffi::G_MOUNT_OPERATION_HANDLED => Self::Handled,
1938             ffi::G_MOUNT_OPERATION_ABORTED => Self::Aborted,
1939             ffi::G_MOUNT_OPERATION_UNHANDLED => Self::Unhandled,
1940             value => Self::__Unknown(value),
1941         }
1942     }
1943 }
1944 
1945 impl StaticType for MountOperationResult {
static_type() -> Type1946     fn static_type() -> Type {
1947         unsafe { from_glib(ffi::g_mount_operation_result_get_type()) }
1948     }
1949 }
1950 
1951 impl glib::value::ValueType for MountOperationResult {
1952     type Type = Self;
1953 }
1954 
1955 unsafe impl<'a> FromValue<'a> for MountOperationResult {
1956     type Checker = glib::value::GenericValueTypeChecker<Self>;
1957 
from_value(value: &'a glib::Value) -> Self1958     unsafe fn from_value(value: &'a glib::Value) -> Self {
1959         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
1960     }
1961 }
1962 
1963 impl ToValue for MountOperationResult {
to_value(&self) -> glib::Value1964     fn to_value(&self) -> glib::Value {
1965         let mut value = glib::Value::for_value_type::<Self>();
1966         unsafe {
1967             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
1968         }
1969         value
1970     }
1971 
value_type(&self) -> glib::Type1972     fn value_type(&self) -> glib::Type {
1973         Self::static_type()
1974     }
1975 }
1976 
1977 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
1978 #[non_exhaustive]
1979 #[doc(alias = "GNetworkConnectivity")]
1980 pub enum NetworkConnectivity {
1981     #[doc(alias = "G_NETWORK_CONNECTIVITY_LOCAL")]
1982     Local,
1983     #[doc(alias = "G_NETWORK_CONNECTIVITY_LIMITED")]
1984     Limited,
1985     #[doc(alias = "G_NETWORK_CONNECTIVITY_PORTAL")]
1986     Portal,
1987     #[doc(alias = "G_NETWORK_CONNECTIVITY_FULL")]
1988     Full,
1989     #[doc(hidden)]
1990     __Unknown(i32),
1991 }
1992 
1993 impl fmt::Display for NetworkConnectivity {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result1994     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1995         write!(
1996             f,
1997             "NetworkConnectivity::{}",
1998             match *self {
1999                 Self::Local => "Local",
2000                 Self::Limited => "Limited",
2001                 Self::Portal => "Portal",
2002                 Self::Full => "Full",
2003                 _ => "Unknown",
2004             }
2005         )
2006     }
2007 }
2008 
2009 #[doc(hidden)]
2010 impl IntoGlib for NetworkConnectivity {
2011     type GlibType = ffi::GNetworkConnectivity;
2012 
into_glib(self) -> ffi::GNetworkConnectivity2013     fn into_glib(self) -> ffi::GNetworkConnectivity {
2014         match self {
2015             Self::Local => ffi::G_NETWORK_CONNECTIVITY_LOCAL,
2016             Self::Limited => ffi::G_NETWORK_CONNECTIVITY_LIMITED,
2017             Self::Portal => ffi::G_NETWORK_CONNECTIVITY_PORTAL,
2018             Self::Full => ffi::G_NETWORK_CONNECTIVITY_FULL,
2019             Self::__Unknown(value) => value,
2020         }
2021     }
2022 }
2023 
2024 #[doc(hidden)]
2025 impl FromGlib<ffi::GNetworkConnectivity> for NetworkConnectivity {
from_glib(value: ffi::GNetworkConnectivity) -> Self2026     unsafe fn from_glib(value: ffi::GNetworkConnectivity) -> Self {
2027         match value {
2028             ffi::G_NETWORK_CONNECTIVITY_LOCAL => Self::Local,
2029             ffi::G_NETWORK_CONNECTIVITY_LIMITED => Self::Limited,
2030             ffi::G_NETWORK_CONNECTIVITY_PORTAL => Self::Portal,
2031             ffi::G_NETWORK_CONNECTIVITY_FULL => Self::Full,
2032             value => Self::__Unknown(value),
2033         }
2034     }
2035 }
2036 
2037 impl StaticType for NetworkConnectivity {
static_type() -> Type2038     fn static_type() -> Type {
2039         unsafe { from_glib(ffi::g_network_connectivity_get_type()) }
2040     }
2041 }
2042 
2043 impl glib::value::ValueType for NetworkConnectivity {
2044     type Type = Self;
2045 }
2046 
2047 unsafe impl<'a> FromValue<'a> for NetworkConnectivity {
2048     type Checker = glib::value::GenericValueTypeChecker<Self>;
2049 
from_value(value: &'a glib::Value) -> Self2050     unsafe fn from_value(value: &'a glib::Value) -> Self {
2051         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2052     }
2053 }
2054 
2055 impl ToValue for NetworkConnectivity {
to_value(&self) -> glib::Value2056     fn to_value(&self) -> glib::Value {
2057         let mut value = glib::Value::for_value_type::<Self>();
2058         unsafe {
2059             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2060         }
2061         value
2062     }
2063 
value_type(&self) -> glib::Type2064     fn value_type(&self) -> glib::Type {
2065         Self::static_type()
2066     }
2067 }
2068 
2069 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2070 #[non_exhaustive]
2071 #[doc(alias = "GNotificationPriority")]
2072 pub enum NotificationPriority {
2073     #[doc(alias = "G_NOTIFICATION_PRIORITY_NORMAL")]
2074     Normal,
2075     #[doc(alias = "G_NOTIFICATION_PRIORITY_LOW")]
2076     Low,
2077     #[doc(alias = "G_NOTIFICATION_PRIORITY_HIGH")]
2078     High,
2079     #[doc(alias = "G_NOTIFICATION_PRIORITY_URGENT")]
2080     Urgent,
2081     #[doc(hidden)]
2082     __Unknown(i32),
2083 }
2084 
2085 impl fmt::Display for NotificationPriority {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2086     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2087         write!(
2088             f,
2089             "NotificationPriority::{}",
2090             match *self {
2091                 Self::Normal => "Normal",
2092                 Self::Low => "Low",
2093                 Self::High => "High",
2094                 Self::Urgent => "Urgent",
2095                 _ => "Unknown",
2096             }
2097         )
2098     }
2099 }
2100 
2101 #[doc(hidden)]
2102 impl IntoGlib for NotificationPriority {
2103     type GlibType = ffi::GNotificationPriority;
2104 
into_glib(self) -> ffi::GNotificationPriority2105     fn into_glib(self) -> ffi::GNotificationPriority {
2106         match self {
2107             Self::Normal => ffi::G_NOTIFICATION_PRIORITY_NORMAL,
2108             Self::Low => ffi::G_NOTIFICATION_PRIORITY_LOW,
2109             Self::High => ffi::G_NOTIFICATION_PRIORITY_HIGH,
2110             Self::Urgent => ffi::G_NOTIFICATION_PRIORITY_URGENT,
2111             Self::__Unknown(value) => value,
2112         }
2113     }
2114 }
2115 
2116 #[doc(hidden)]
2117 impl FromGlib<ffi::GNotificationPriority> for NotificationPriority {
from_glib(value: ffi::GNotificationPriority) -> Self2118     unsafe fn from_glib(value: ffi::GNotificationPriority) -> Self {
2119         match value {
2120             ffi::G_NOTIFICATION_PRIORITY_NORMAL => Self::Normal,
2121             ffi::G_NOTIFICATION_PRIORITY_LOW => Self::Low,
2122             ffi::G_NOTIFICATION_PRIORITY_HIGH => Self::High,
2123             ffi::G_NOTIFICATION_PRIORITY_URGENT => Self::Urgent,
2124             value => Self::__Unknown(value),
2125         }
2126     }
2127 }
2128 
2129 impl StaticType for NotificationPriority {
static_type() -> Type2130     fn static_type() -> Type {
2131         unsafe { from_glib(ffi::g_notification_priority_get_type()) }
2132     }
2133 }
2134 
2135 impl glib::value::ValueType for NotificationPriority {
2136     type Type = Self;
2137 }
2138 
2139 unsafe impl<'a> FromValue<'a> for NotificationPriority {
2140     type Checker = glib::value::GenericValueTypeChecker<Self>;
2141 
from_value(value: &'a glib::Value) -> Self2142     unsafe fn from_value(value: &'a glib::Value) -> Self {
2143         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2144     }
2145 }
2146 
2147 impl ToValue for NotificationPriority {
to_value(&self) -> glib::Value2148     fn to_value(&self) -> glib::Value {
2149         let mut value = glib::Value::for_value_type::<Self>();
2150         unsafe {
2151             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2152         }
2153         value
2154     }
2155 
value_type(&self) -> glib::Type2156     fn value_type(&self) -> glib::Type {
2157         Self::static_type()
2158     }
2159 }
2160 
2161 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2162 #[non_exhaustive]
2163 #[doc(alias = "GPasswordSave")]
2164 pub enum PasswordSave {
2165     #[doc(alias = "G_PASSWORD_SAVE_NEVER")]
2166     Never,
2167     #[doc(alias = "G_PASSWORD_SAVE_FOR_SESSION")]
2168     ForSession,
2169     #[doc(alias = "G_PASSWORD_SAVE_PERMANENTLY")]
2170     Permanently,
2171     #[doc(hidden)]
2172     __Unknown(i32),
2173 }
2174 
2175 impl fmt::Display for PasswordSave {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2176     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2177         write!(
2178             f,
2179             "PasswordSave::{}",
2180             match *self {
2181                 Self::Never => "Never",
2182                 Self::ForSession => "ForSession",
2183                 Self::Permanently => "Permanently",
2184                 _ => "Unknown",
2185             }
2186         )
2187     }
2188 }
2189 
2190 #[doc(hidden)]
2191 impl IntoGlib for PasswordSave {
2192     type GlibType = ffi::GPasswordSave;
2193 
into_glib(self) -> ffi::GPasswordSave2194     fn into_glib(self) -> ffi::GPasswordSave {
2195         match self {
2196             Self::Never => ffi::G_PASSWORD_SAVE_NEVER,
2197             Self::ForSession => ffi::G_PASSWORD_SAVE_FOR_SESSION,
2198             Self::Permanently => ffi::G_PASSWORD_SAVE_PERMANENTLY,
2199             Self::__Unknown(value) => value,
2200         }
2201     }
2202 }
2203 
2204 #[doc(hidden)]
2205 impl FromGlib<ffi::GPasswordSave> for PasswordSave {
from_glib(value: ffi::GPasswordSave) -> Self2206     unsafe fn from_glib(value: ffi::GPasswordSave) -> Self {
2207         match value {
2208             ffi::G_PASSWORD_SAVE_NEVER => Self::Never,
2209             ffi::G_PASSWORD_SAVE_FOR_SESSION => Self::ForSession,
2210             ffi::G_PASSWORD_SAVE_PERMANENTLY => Self::Permanently,
2211             value => Self::__Unknown(value),
2212         }
2213     }
2214 }
2215 
2216 impl StaticType for PasswordSave {
static_type() -> Type2217     fn static_type() -> Type {
2218         unsafe { from_glib(ffi::g_password_save_get_type()) }
2219     }
2220 }
2221 
2222 impl glib::value::ValueType for PasswordSave {
2223     type Type = Self;
2224 }
2225 
2226 unsafe impl<'a> FromValue<'a> for PasswordSave {
2227     type Checker = glib::value::GenericValueTypeChecker<Self>;
2228 
from_value(value: &'a glib::Value) -> Self2229     unsafe fn from_value(value: &'a glib::Value) -> Self {
2230         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2231     }
2232 }
2233 
2234 impl ToValue for PasswordSave {
to_value(&self) -> glib::Value2235     fn to_value(&self) -> glib::Value {
2236         let mut value = glib::Value::for_value_type::<Self>();
2237         unsafe {
2238             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2239         }
2240         value
2241     }
2242 
value_type(&self) -> glib::Type2243     fn value_type(&self) -> glib::Type {
2244         Self::static_type()
2245     }
2246 }
2247 
2248 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2249 #[non_exhaustive]
2250 #[doc(alias = "GResolverRecordType")]
2251 pub enum ResolverRecordType {
2252     #[doc(alias = "G_RESOLVER_RECORD_SRV")]
2253     Srv,
2254     #[doc(alias = "G_RESOLVER_RECORD_MX")]
2255     Mx,
2256     #[doc(alias = "G_RESOLVER_RECORD_TXT")]
2257     Txt,
2258     #[doc(alias = "G_RESOLVER_RECORD_SOA")]
2259     Soa,
2260     #[doc(alias = "G_RESOLVER_RECORD_NS")]
2261     Ns,
2262     #[doc(hidden)]
2263     __Unknown(i32),
2264 }
2265 
2266 impl fmt::Display for ResolverRecordType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2267     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2268         write!(
2269             f,
2270             "ResolverRecordType::{}",
2271             match *self {
2272                 Self::Srv => "Srv",
2273                 Self::Mx => "Mx",
2274                 Self::Txt => "Txt",
2275                 Self::Soa => "Soa",
2276                 Self::Ns => "Ns",
2277                 _ => "Unknown",
2278             }
2279         )
2280     }
2281 }
2282 
2283 #[doc(hidden)]
2284 impl IntoGlib for ResolverRecordType {
2285     type GlibType = ffi::GResolverRecordType;
2286 
into_glib(self) -> ffi::GResolverRecordType2287     fn into_glib(self) -> ffi::GResolverRecordType {
2288         match self {
2289             Self::Srv => ffi::G_RESOLVER_RECORD_SRV,
2290             Self::Mx => ffi::G_RESOLVER_RECORD_MX,
2291             Self::Txt => ffi::G_RESOLVER_RECORD_TXT,
2292             Self::Soa => ffi::G_RESOLVER_RECORD_SOA,
2293             Self::Ns => ffi::G_RESOLVER_RECORD_NS,
2294             Self::__Unknown(value) => value,
2295         }
2296     }
2297 }
2298 
2299 #[doc(hidden)]
2300 impl FromGlib<ffi::GResolverRecordType> for ResolverRecordType {
from_glib(value: ffi::GResolverRecordType) -> Self2301     unsafe fn from_glib(value: ffi::GResolverRecordType) -> Self {
2302         match value {
2303             ffi::G_RESOLVER_RECORD_SRV => Self::Srv,
2304             ffi::G_RESOLVER_RECORD_MX => Self::Mx,
2305             ffi::G_RESOLVER_RECORD_TXT => Self::Txt,
2306             ffi::G_RESOLVER_RECORD_SOA => Self::Soa,
2307             ffi::G_RESOLVER_RECORD_NS => Self::Ns,
2308             value => Self::__Unknown(value),
2309         }
2310     }
2311 }
2312 
2313 impl StaticType for ResolverRecordType {
static_type() -> Type2314     fn static_type() -> Type {
2315         unsafe { from_glib(ffi::g_resolver_record_type_get_type()) }
2316     }
2317 }
2318 
2319 impl glib::value::ValueType for ResolverRecordType {
2320     type Type = Self;
2321 }
2322 
2323 unsafe impl<'a> FromValue<'a> for ResolverRecordType {
2324     type Checker = glib::value::GenericValueTypeChecker<Self>;
2325 
from_value(value: &'a glib::Value) -> Self2326     unsafe fn from_value(value: &'a glib::Value) -> Self {
2327         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2328     }
2329 }
2330 
2331 impl ToValue for ResolverRecordType {
to_value(&self) -> glib::Value2332     fn to_value(&self) -> glib::Value {
2333         let mut value = glib::Value::for_value_type::<Self>();
2334         unsafe {
2335             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2336         }
2337         value
2338     }
2339 
value_type(&self) -> glib::Type2340     fn value_type(&self) -> glib::Type {
2341         Self::static_type()
2342     }
2343 }
2344 
2345 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2346 #[non_exhaustive]
2347 #[doc(alias = "GResourceError")]
2348 pub enum ResourceError {
2349     #[doc(alias = "G_RESOURCE_ERROR_NOT_FOUND")]
2350     NotFound,
2351     #[doc(alias = "G_RESOURCE_ERROR_INTERNAL")]
2352     Internal,
2353     #[doc(hidden)]
2354     __Unknown(i32),
2355 }
2356 
2357 impl fmt::Display for ResourceError {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2358     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2359         write!(
2360             f,
2361             "ResourceError::{}",
2362             match *self {
2363                 Self::NotFound => "NotFound",
2364                 Self::Internal => "Internal",
2365                 _ => "Unknown",
2366             }
2367         )
2368     }
2369 }
2370 
2371 #[doc(hidden)]
2372 impl IntoGlib for ResourceError {
2373     type GlibType = ffi::GResourceError;
2374 
into_glib(self) -> ffi::GResourceError2375     fn into_glib(self) -> ffi::GResourceError {
2376         match self {
2377             Self::NotFound => ffi::G_RESOURCE_ERROR_NOT_FOUND,
2378             Self::Internal => ffi::G_RESOURCE_ERROR_INTERNAL,
2379             Self::__Unknown(value) => value,
2380         }
2381     }
2382 }
2383 
2384 #[doc(hidden)]
2385 impl FromGlib<ffi::GResourceError> for ResourceError {
from_glib(value: ffi::GResourceError) -> Self2386     unsafe fn from_glib(value: ffi::GResourceError) -> Self {
2387         match value {
2388             ffi::G_RESOURCE_ERROR_NOT_FOUND => Self::NotFound,
2389             ffi::G_RESOURCE_ERROR_INTERNAL => Self::Internal,
2390             value => Self::__Unknown(value),
2391         }
2392     }
2393 }
2394 
2395 impl ErrorDomain for ResourceError {
domain() -> Quark2396     fn domain() -> Quark {
2397         unsafe { from_glib(ffi::g_resource_error_quark()) }
2398     }
2399 
code(self) -> i322400     fn code(self) -> i32 {
2401         self.into_glib()
2402     }
2403 
from(code: i32) -> Option<Self>2404     fn from(code: i32) -> Option<Self> {
2405         match code {
2406             ffi::G_RESOURCE_ERROR_NOT_FOUND => Some(Self::NotFound),
2407             ffi::G_RESOURCE_ERROR_INTERNAL => Some(Self::Internal),
2408             value => Some(Self::__Unknown(value)),
2409         }
2410     }
2411 }
2412 
2413 impl StaticType for ResourceError {
static_type() -> Type2414     fn static_type() -> Type {
2415         unsafe { from_glib(ffi::g_resource_error_get_type()) }
2416     }
2417 }
2418 
2419 impl glib::value::ValueType for ResourceError {
2420     type Type = Self;
2421 }
2422 
2423 unsafe impl<'a> FromValue<'a> for ResourceError {
2424     type Checker = glib::value::GenericValueTypeChecker<Self>;
2425 
from_value(value: &'a glib::Value) -> Self2426     unsafe fn from_value(value: &'a glib::Value) -> Self {
2427         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2428     }
2429 }
2430 
2431 impl ToValue for ResourceError {
to_value(&self) -> glib::Value2432     fn to_value(&self) -> glib::Value {
2433         let mut value = glib::Value::for_value_type::<Self>();
2434         unsafe {
2435             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2436         }
2437         value
2438     }
2439 
value_type(&self) -> glib::Type2440     fn value_type(&self) -> glib::Type {
2441         Self::static_type()
2442     }
2443 }
2444 
2445 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2446 #[non_exhaustive]
2447 #[doc(alias = "GSocketClientEvent")]
2448 pub enum SocketClientEvent {
2449     #[doc(alias = "G_SOCKET_CLIENT_RESOLVING")]
2450     Resolving,
2451     #[doc(alias = "G_SOCKET_CLIENT_RESOLVED")]
2452     Resolved,
2453     #[doc(alias = "G_SOCKET_CLIENT_CONNECTING")]
2454     Connecting,
2455     #[doc(alias = "G_SOCKET_CLIENT_CONNECTED")]
2456     Connected,
2457     #[doc(alias = "G_SOCKET_CLIENT_PROXY_NEGOTIATING")]
2458     ProxyNegotiating,
2459     #[doc(alias = "G_SOCKET_CLIENT_PROXY_NEGOTIATED")]
2460     ProxyNegotiated,
2461     #[doc(alias = "G_SOCKET_CLIENT_TLS_HANDSHAKING")]
2462     TlsHandshaking,
2463     #[doc(alias = "G_SOCKET_CLIENT_TLS_HANDSHAKED")]
2464     TlsHandshaked,
2465     #[doc(alias = "G_SOCKET_CLIENT_COMPLETE")]
2466     Complete,
2467     #[doc(hidden)]
2468     __Unknown(i32),
2469 }
2470 
2471 impl fmt::Display for SocketClientEvent {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2472     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2473         write!(
2474             f,
2475             "SocketClientEvent::{}",
2476             match *self {
2477                 Self::Resolving => "Resolving",
2478                 Self::Resolved => "Resolved",
2479                 Self::Connecting => "Connecting",
2480                 Self::Connected => "Connected",
2481                 Self::ProxyNegotiating => "ProxyNegotiating",
2482                 Self::ProxyNegotiated => "ProxyNegotiated",
2483                 Self::TlsHandshaking => "TlsHandshaking",
2484                 Self::TlsHandshaked => "TlsHandshaked",
2485                 Self::Complete => "Complete",
2486                 _ => "Unknown",
2487             }
2488         )
2489     }
2490 }
2491 
2492 #[doc(hidden)]
2493 impl IntoGlib for SocketClientEvent {
2494     type GlibType = ffi::GSocketClientEvent;
2495 
into_glib(self) -> ffi::GSocketClientEvent2496     fn into_glib(self) -> ffi::GSocketClientEvent {
2497         match self {
2498             Self::Resolving => ffi::G_SOCKET_CLIENT_RESOLVING,
2499             Self::Resolved => ffi::G_SOCKET_CLIENT_RESOLVED,
2500             Self::Connecting => ffi::G_SOCKET_CLIENT_CONNECTING,
2501             Self::Connected => ffi::G_SOCKET_CLIENT_CONNECTED,
2502             Self::ProxyNegotiating => ffi::G_SOCKET_CLIENT_PROXY_NEGOTIATING,
2503             Self::ProxyNegotiated => ffi::G_SOCKET_CLIENT_PROXY_NEGOTIATED,
2504             Self::TlsHandshaking => ffi::G_SOCKET_CLIENT_TLS_HANDSHAKING,
2505             Self::TlsHandshaked => ffi::G_SOCKET_CLIENT_TLS_HANDSHAKED,
2506             Self::Complete => ffi::G_SOCKET_CLIENT_COMPLETE,
2507             Self::__Unknown(value) => value,
2508         }
2509     }
2510 }
2511 
2512 #[doc(hidden)]
2513 impl FromGlib<ffi::GSocketClientEvent> for SocketClientEvent {
from_glib(value: ffi::GSocketClientEvent) -> Self2514     unsafe fn from_glib(value: ffi::GSocketClientEvent) -> Self {
2515         match value {
2516             ffi::G_SOCKET_CLIENT_RESOLVING => Self::Resolving,
2517             ffi::G_SOCKET_CLIENT_RESOLVED => Self::Resolved,
2518             ffi::G_SOCKET_CLIENT_CONNECTING => Self::Connecting,
2519             ffi::G_SOCKET_CLIENT_CONNECTED => Self::Connected,
2520             ffi::G_SOCKET_CLIENT_PROXY_NEGOTIATING => Self::ProxyNegotiating,
2521             ffi::G_SOCKET_CLIENT_PROXY_NEGOTIATED => Self::ProxyNegotiated,
2522             ffi::G_SOCKET_CLIENT_TLS_HANDSHAKING => Self::TlsHandshaking,
2523             ffi::G_SOCKET_CLIENT_TLS_HANDSHAKED => Self::TlsHandshaked,
2524             ffi::G_SOCKET_CLIENT_COMPLETE => Self::Complete,
2525             value => Self::__Unknown(value),
2526         }
2527     }
2528 }
2529 
2530 impl StaticType for SocketClientEvent {
static_type() -> Type2531     fn static_type() -> Type {
2532         unsafe { from_glib(ffi::g_socket_client_event_get_type()) }
2533     }
2534 }
2535 
2536 impl glib::value::ValueType for SocketClientEvent {
2537     type Type = Self;
2538 }
2539 
2540 unsafe impl<'a> FromValue<'a> for SocketClientEvent {
2541     type Checker = glib::value::GenericValueTypeChecker<Self>;
2542 
from_value(value: &'a glib::Value) -> Self2543     unsafe fn from_value(value: &'a glib::Value) -> Self {
2544         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2545     }
2546 }
2547 
2548 impl ToValue for SocketClientEvent {
to_value(&self) -> glib::Value2549     fn to_value(&self) -> glib::Value {
2550         let mut value = glib::Value::for_value_type::<Self>();
2551         unsafe {
2552             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2553         }
2554         value
2555     }
2556 
value_type(&self) -> glib::Type2557     fn value_type(&self) -> glib::Type {
2558         Self::static_type()
2559     }
2560 }
2561 
2562 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2563 #[non_exhaustive]
2564 #[doc(alias = "GSocketFamily")]
2565 pub enum SocketFamily {
2566     #[doc(alias = "G_SOCKET_FAMILY_INVALID")]
2567     Invalid,
2568     #[doc(alias = "G_SOCKET_FAMILY_UNIX")]
2569     Unix,
2570     #[doc(alias = "G_SOCKET_FAMILY_IPV4")]
2571     Ipv4,
2572     #[doc(alias = "G_SOCKET_FAMILY_IPV6")]
2573     Ipv6,
2574     #[doc(hidden)]
2575     __Unknown(i32),
2576 }
2577 
2578 impl fmt::Display for SocketFamily {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2579     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2580         write!(
2581             f,
2582             "SocketFamily::{}",
2583             match *self {
2584                 Self::Invalid => "Invalid",
2585                 Self::Unix => "Unix",
2586                 Self::Ipv4 => "Ipv4",
2587                 Self::Ipv6 => "Ipv6",
2588                 _ => "Unknown",
2589             }
2590         )
2591     }
2592 }
2593 
2594 #[doc(hidden)]
2595 impl IntoGlib for SocketFamily {
2596     type GlibType = ffi::GSocketFamily;
2597 
into_glib(self) -> ffi::GSocketFamily2598     fn into_glib(self) -> ffi::GSocketFamily {
2599         match self {
2600             Self::Invalid => ffi::G_SOCKET_FAMILY_INVALID,
2601             Self::Unix => ffi::G_SOCKET_FAMILY_UNIX,
2602             Self::Ipv4 => ffi::G_SOCKET_FAMILY_IPV4,
2603             Self::Ipv6 => ffi::G_SOCKET_FAMILY_IPV6,
2604             Self::__Unknown(value) => value,
2605         }
2606     }
2607 }
2608 
2609 #[doc(hidden)]
2610 impl FromGlib<ffi::GSocketFamily> for SocketFamily {
from_glib(value: ffi::GSocketFamily) -> Self2611     unsafe fn from_glib(value: ffi::GSocketFamily) -> Self {
2612         match value {
2613             ffi::G_SOCKET_FAMILY_INVALID => Self::Invalid,
2614             ffi::G_SOCKET_FAMILY_UNIX => Self::Unix,
2615             ffi::G_SOCKET_FAMILY_IPV4 => Self::Ipv4,
2616             ffi::G_SOCKET_FAMILY_IPV6 => Self::Ipv6,
2617             value => Self::__Unknown(value),
2618         }
2619     }
2620 }
2621 
2622 impl StaticType for SocketFamily {
static_type() -> Type2623     fn static_type() -> Type {
2624         unsafe { from_glib(ffi::g_socket_family_get_type()) }
2625     }
2626 }
2627 
2628 impl glib::value::ValueType for SocketFamily {
2629     type Type = Self;
2630 }
2631 
2632 unsafe impl<'a> FromValue<'a> for SocketFamily {
2633     type Checker = glib::value::GenericValueTypeChecker<Self>;
2634 
from_value(value: &'a glib::Value) -> Self2635     unsafe fn from_value(value: &'a glib::Value) -> Self {
2636         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2637     }
2638 }
2639 
2640 impl ToValue for SocketFamily {
to_value(&self) -> glib::Value2641     fn to_value(&self) -> glib::Value {
2642         let mut value = glib::Value::for_value_type::<Self>();
2643         unsafe {
2644             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2645         }
2646         value
2647     }
2648 
value_type(&self) -> glib::Type2649     fn value_type(&self) -> glib::Type {
2650         Self::static_type()
2651     }
2652 }
2653 
2654 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2655 #[non_exhaustive]
2656 #[doc(alias = "GSocketListenerEvent")]
2657 pub enum SocketListenerEvent {
2658     #[doc(alias = "G_SOCKET_LISTENER_BINDING")]
2659     Binding,
2660     #[doc(alias = "G_SOCKET_LISTENER_BOUND")]
2661     Bound,
2662     #[doc(alias = "G_SOCKET_LISTENER_LISTENING")]
2663     Listening,
2664     #[doc(alias = "G_SOCKET_LISTENER_LISTENED")]
2665     Listened,
2666     #[doc(hidden)]
2667     __Unknown(i32),
2668 }
2669 
2670 impl fmt::Display for SocketListenerEvent {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2671     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2672         write!(
2673             f,
2674             "SocketListenerEvent::{}",
2675             match *self {
2676                 Self::Binding => "Binding",
2677                 Self::Bound => "Bound",
2678                 Self::Listening => "Listening",
2679                 Self::Listened => "Listened",
2680                 _ => "Unknown",
2681             }
2682         )
2683     }
2684 }
2685 
2686 #[doc(hidden)]
2687 impl IntoGlib for SocketListenerEvent {
2688     type GlibType = ffi::GSocketListenerEvent;
2689 
into_glib(self) -> ffi::GSocketListenerEvent2690     fn into_glib(self) -> ffi::GSocketListenerEvent {
2691         match self {
2692             Self::Binding => ffi::G_SOCKET_LISTENER_BINDING,
2693             Self::Bound => ffi::G_SOCKET_LISTENER_BOUND,
2694             Self::Listening => ffi::G_SOCKET_LISTENER_LISTENING,
2695             Self::Listened => ffi::G_SOCKET_LISTENER_LISTENED,
2696             Self::__Unknown(value) => value,
2697         }
2698     }
2699 }
2700 
2701 #[doc(hidden)]
2702 impl FromGlib<ffi::GSocketListenerEvent> for SocketListenerEvent {
from_glib(value: ffi::GSocketListenerEvent) -> Self2703     unsafe fn from_glib(value: ffi::GSocketListenerEvent) -> Self {
2704         match value {
2705             ffi::G_SOCKET_LISTENER_BINDING => Self::Binding,
2706             ffi::G_SOCKET_LISTENER_BOUND => Self::Bound,
2707             ffi::G_SOCKET_LISTENER_LISTENING => Self::Listening,
2708             ffi::G_SOCKET_LISTENER_LISTENED => Self::Listened,
2709             value => Self::__Unknown(value),
2710         }
2711     }
2712 }
2713 
2714 impl StaticType for SocketListenerEvent {
static_type() -> Type2715     fn static_type() -> Type {
2716         unsafe { from_glib(ffi::g_socket_listener_event_get_type()) }
2717     }
2718 }
2719 
2720 impl glib::value::ValueType for SocketListenerEvent {
2721     type Type = Self;
2722 }
2723 
2724 unsafe impl<'a> FromValue<'a> for SocketListenerEvent {
2725     type Checker = glib::value::GenericValueTypeChecker<Self>;
2726 
from_value(value: &'a glib::Value) -> Self2727     unsafe fn from_value(value: &'a glib::Value) -> Self {
2728         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2729     }
2730 }
2731 
2732 impl ToValue for SocketListenerEvent {
to_value(&self) -> glib::Value2733     fn to_value(&self) -> glib::Value {
2734         let mut value = glib::Value::for_value_type::<Self>();
2735         unsafe {
2736             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2737         }
2738         value
2739     }
2740 
value_type(&self) -> glib::Type2741     fn value_type(&self) -> glib::Type {
2742         Self::static_type()
2743     }
2744 }
2745 
2746 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2747 #[non_exhaustive]
2748 #[doc(alias = "GSocketProtocol")]
2749 pub enum SocketProtocol {
2750     #[doc(alias = "G_SOCKET_PROTOCOL_UNKNOWN")]
2751     Unknown,
2752     #[doc(alias = "G_SOCKET_PROTOCOL_DEFAULT")]
2753     Default,
2754     #[doc(alias = "G_SOCKET_PROTOCOL_TCP")]
2755     Tcp,
2756     #[doc(alias = "G_SOCKET_PROTOCOL_UDP")]
2757     Udp,
2758     #[doc(alias = "G_SOCKET_PROTOCOL_SCTP")]
2759     Sctp,
2760     #[doc(hidden)]
2761     __Unknown(i32),
2762 }
2763 
2764 impl fmt::Display for SocketProtocol {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2765     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2766         write!(
2767             f,
2768             "SocketProtocol::{}",
2769             match *self {
2770                 Self::Unknown => "Unknown",
2771                 Self::Default => "Default",
2772                 Self::Tcp => "Tcp",
2773                 Self::Udp => "Udp",
2774                 Self::Sctp => "Sctp",
2775                 _ => "Unknown",
2776             }
2777         )
2778     }
2779 }
2780 
2781 #[doc(hidden)]
2782 impl IntoGlib for SocketProtocol {
2783     type GlibType = ffi::GSocketProtocol;
2784 
into_glib(self) -> ffi::GSocketProtocol2785     fn into_glib(self) -> ffi::GSocketProtocol {
2786         match self {
2787             Self::Unknown => ffi::G_SOCKET_PROTOCOL_UNKNOWN,
2788             Self::Default => ffi::G_SOCKET_PROTOCOL_DEFAULT,
2789             Self::Tcp => ffi::G_SOCKET_PROTOCOL_TCP,
2790             Self::Udp => ffi::G_SOCKET_PROTOCOL_UDP,
2791             Self::Sctp => ffi::G_SOCKET_PROTOCOL_SCTP,
2792             Self::__Unknown(value) => value,
2793         }
2794     }
2795 }
2796 
2797 #[doc(hidden)]
2798 impl FromGlib<ffi::GSocketProtocol> for SocketProtocol {
from_glib(value: ffi::GSocketProtocol) -> Self2799     unsafe fn from_glib(value: ffi::GSocketProtocol) -> Self {
2800         match value {
2801             ffi::G_SOCKET_PROTOCOL_UNKNOWN => Self::Unknown,
2802             ffi::G_SOCKET_PROTOCOL_DEFAULT => Self::Default,
2803             ffi::G_SOCKET_PROTOCOL_TCP => Self::Tcp,
2804             ffi::G_SOCKET_PROTOCOL_UDP => Self::Udp,
2805             ffi::G_SOCKET_PROTOCOL_SCTP => Self::Sctp,
2806             value => Self::__Unknown(value),
2807         }
2808     }
2809 }
2810 
2811 impl StaticType for SocketProtocol {
static_type() -> Type2812     fn static_type() -> Type {
2813         unsafe { from_glib(ffi::g_socket_protocol_get_type()) }
2814     }
2815 }
2816 
2817 impl glib::value::ValueType for SocketProtocol {
2818     type Type = Self;
2819 }
2820 
2821 unsafe impl<'a> FromValue<'a> for SocketProtocol {
2822     type Checker = glib::value::GenericValueTypeChecker<Self>;
2823 
from_value(value: &'a glib::Value) -> Self2824     unsafe fn from_value(value: &'a glib::Value) -> Self {
2825         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2826     }
2827 }
2828 
2829 impl ToValue for SocketProtocol {
to_value(&self) -> glib::Value2830     fn to_value(&self) -> glib::Value {
2831         let mut value = glib::Value::for_value_type::<Self>();
2832         unsafe {
2833             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2834         }
2835         value
2836     }
2837 
value_type(&self) -> glib::Type2838     fn value_type(&self) -> glib::Type {
2839         Self::static_type()
2840     }
2841 }
2842 
2843 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2844 #[non_exhaustive]
2845 #[doc(alias = "GSocketType")]
2846 pub enum SocketType {
2847     #[doc(alias = "G_SOCKET_TYPE_INVALID")]
2848     Invalid,
2849     #[doc(alias = "G_SOCKET_TYPE_STREAM")]
2850     Stream,
2851     #[doc(alias = "G_SOCKET_TYPE_DATAGRAM")]
2852     Datagram,
2853     #[doc(alias = "G_SOCKET_TYPE_SEQPACKET")]
2854     Seqpacket,
2855     #[doc(hidden)]
2856     __Unknown(i32),
2857 }
2858 
2859 impl fmt::Display for SocketType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2860     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2861         write!(
2862             f,
2863             "SocketType::{}",
2864             match *self {
2865                 Self::Invalid => "Invalid",
2866                 Self::Stream => "Stream",
2867                 Self::Datagram => "Datagram",
2868                 Self::Seqpacket => "Seqpacket",
2869                 _ => "Unknown",
2870             }
2871         )
2872     }
2873 }
2874 
2875 #[doc(hidden)]
2876 impl IntoGlib for SocketType {
2877     type GlibType = ffi::GSocketType;
2878 
into_glib(self) -> ffi::GSocketType2879     fn into_glib(self) -> ffi::GSocketType {
2880         match self {
2881             Self::Invalid => ffi::G_SOCKET_TYPE_INVALID,
2882             Self::Stream => ffi::G_SOCKET_TYPE_STREAM,
2883             Self::Datagram => ffi::G_SOCKET_TYPE_DATAGRAM,
2884             Self::Seqpacket => ffi::G_SOCKET_TYPE_SEQPACKET,
2885             Self::__Unknown(value) => value,
2886         }
2887     }
2888 }
2889 
2890 #[doc(hidden)]
2891 impl FromGlib<ffi::GSocketType> for SocketType {
from_glib(value: ffi::GSocketType) -> Self2892     unsafe fn from_glib(value: ffi::GSocketType) -> Self {
2893         match value {
2894             ffi::G_SOCKET_TYPE_INVALID => Self::Invalid,
2895             ffi::G_SOCKET_TYPE_STREAM => Self::Stream,
2896             ffi::G_SOCKET_TYPE_DATAGRAM => Self::Datagram,
2897             ffi::G_SOCKET_TYPE_SEQPACKET => Self::Seqpacket,
2898             value => Self::__Unknown(value),
2899         }
2900     }
2901 }
2902 
2903 impl StaticType for SocketType {
static_type() -> Type2904     fn static_type() -> Type {
2905         unsafe { from_glib(ffi::g_socket_type_get_type()) }
2906     }
2907 }
2908 
2909 impl glib::value::ValueType for SocketType {
2910     type Type = Self;
2911 }
2912 
2913 unsafe impl<'a> FromValue<'a> for SocketType {
2914     type Checker = glib::value::GenericValueTypeChecker<Self>;
2915 
from_value(value: &'a glib::Value) -> Self2916     unsafe fn from_value(value: &'a glib::Value) -> Self {
2917         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
2918     }
2919 }
2920 
2921 impl ToValue for SocketType {
to_value(&self) -> glib::Value2922     fn to_value(&self) -> glib::Value {
2923         let mut value = glib::Value::for_value_type::<Self>();
2924         unsafe {
2925             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
2926         }
2927         value
2928     }
2929 
value_type(&self) -> glib::Type2930     fn value_type(&self) -> glib::Type {
2931         Self::static_type()
2932     }
2933 }
2934 
2935 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2936 #[non_exhaustive]
2937 #[doc(alias = "GTlsAuthenticationMode")]
2938 pub enum TlsAuthenticationMode {
2939     #[doc(alias = "G_TLS_AUTHENTICATION_NONE")]
2940     None,
2941     #[doc(alias = "G_TLS_AUTHENTICATION_REQUESTED")]
2942     Requested,
2943     #[doc(alias = "G_TLS_AUTHENTICATION_REQUIRED")]
2944     Required,
2945     #[doc(hidden)]
2946     __Unknown(i32),
2947 }
2948 
2949 impl fmt::Display for TlsAuthenticationMode {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result2950     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2951         write!(
2952             f,
2953             "TlsAuthenticationMode::{}",
2954             match *self {
2955                 Self::None => "None",
2956                 Self::Requested => "Requested",
2957                 Self::Required => "Required",
2958                 _ => "Unknown",
2959             }
2960         )
2961     }
2962 }
2963 
2964 #[doc(hidden)]
2965 impl IntoGlib for TlsAuthenticationMode {
2966     type GlibType = ffi::GTlsAuthenticationMode;
2967 
into_glib(self) -> ffi::GTlsAuthenticationMode2968     fn into_glib(self) -> ffi::GTlsAuthenticationMode {
2969         match self {
2970             Self::None => ffi::G_TLS_AUTHENTICATION_NONE,
2971             Self::Requested => ffi::G_TLS_AUTHENTICATION_REQUESTED,
2972             Self::Required => ffi::G_TLS_AUTHENTICATION_REQUIRED,
2973             Self::__Unknown(value) => value,
2974         }
2975     }
2976 }
2977 
2978 #[doc(hidden)]
2979 impl FromGlib<ffi::GTlsAuthenticationMode> for TlsAuthenticationMode {
from_glib(value: ffi::GTlsAuthenticationMode) -> Self2980     unsafe fn from_glib(value: ffi::GTlsAuthenticationMode) -> Self {
2981         match value {
2982             ffi::G_TLS_AUTHENTICATION_NONE => Self::None,
2983             ffi::G_TLS_AUTHENTICATION_REQUESTED => Self::Requested,
2984             ffi::G_TLS_AUTHENTICATION_REQUIRED => Self::Required,
2985             value => Self::__Unknown(value),
2986         }
2987     }
2988 }
2989 
2990 impl StaticType for TlsAuthenticationMode {
static_type() -> Type2991     fn static_type() -> Type {
2992         unsafe { from_glib(ffi::g_tls_authentication_mode_get_type()) }
2993     }
2994 }
2995 
2996 impl glib::value::ValueType for TlsAuthenticationMode {
2997     type Type = Self;
2998 }
2999 
3000 unsafe impl<'a> FromValue<'a> for TlsAuthenticationMode {
3001     type Checker = glib::value::GenericValueTypeChecker<Self>;
3002 
from_value(value: &'a glib::Value) -> Self3003     unsafe fn from_value(value: &'a glib::Value) -> Self {
3004         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3005     }
3006 }
3007 
3008 impl ToValue for TlsAuthenticationMode {
to_value(&self) -> glib::Value3009     fn to_value(&self) -> glib::Value {
3010         let mut value = glib::Value::for_value_type::<Self>();
3011         unsafe {
3012             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3013         }
3014         value
3015     }
3016 
value_type(&self) -> glib::Type3017     fn value_type(&self) -> glib::Type {
3018         Self::static_type()
3019     }
3020 }
3021 
3022 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3023 #[non_exhaustive]
3024 #[doc(alias = "GTlsCertificateRequestFlags")]
3025 pub enum TlsCertificateRequestFlags {
3026     #[doc(alias = "G_TLS_CERTIFICATE_REQUEST_NONE")]
3027     None,
3028     #[doc(hidden)]
3029     __Unknown(i32),
3030 }
3031 
3032 impl fmt::Display for TlsCertificateRequestFlags {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3033     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3034         write!(
3035             f,
3036             "TlsCertificateRequestFlags::{}",
3037             match *self {
3038                 Self::None => "None",
3039                 _ => "Unknown",
3040             }
3041         )
3042     }
3043 }
3044 
3045 #[doc(hidden)]
3046 impl IntoGlib for TlsCertificateRequestFlags {
3047     type GlibType = ffi::GTlsCertificateRequestFlags;
3048 
into_glib(self) -> ffi::GTlsCertificateRequestFlags3049     fn into_glib(self) -> ffi::GTlsCertificateRequestFlags {
3050         match self {
3051             Self::None => ffi::G_TLS_CERTIFICATE_REQUEST_NONE,
3052             Self::__Unknown(value) => value,
3053         }
3054     }
3055 }
3056 
3057 #[doc(hidden)]
3058 impl FromGlib<ffi::GTlsCertificateRequestFlags> for TlsCertificateRequestFlags {
from_glib(value: ffi::GTlsCertificateRequestFlags) -> Self3059     unsafe fn from_glib(value: ffi::GTlsCertificateRequestFlags) -> Self {
3060         match value {
3061             ffi::G_TLS_CERTIFICATE_REQUEST_NONE => Self::None,
3062             value => Self::__Unknown(value),
3063         }
3064     }
3065 }
3066 
3067 impl StaticType for TlsCertificateRequestFlags {
static_type() -> Type3068     fn static_type() -> Type {
3069         unsafe { from_glib(ffi::g_tls_certificate_request_flags_get_type()) }
3070     }
3071 }
3072 
3073 impl glib::value::ValueType for TlsCertificateRequestFlags {
3074     type Type = Self;
3075 }
3076 
3077 unsafe impl<'a> FromValue<'a> for TlsCertificateRequestFlags {
3078     type Checker = glib::value::GenericValueTypeChecker<Self>;
3079 
from_value(value: &'a glib::Value) -> Self3080     unsafe fn from_value(value: &'a glib::Value) -> Self {
3081         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3082     }
3083 }
3084 
3085 impl ToValue for TlsCertificateRequestFlags {
to_value(&self) -> glib::Value3086     fn to_value(&self) -> glib::Value {
3087         let mut value = glib::Value::for_value_type::<Self>();
3088         unsafe {
3089             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3090         }
3091         value
3092     }
3093 
value_type(&self) -> glib::Type3094     fn value_type(&self) -> glib::Type {
3095         Self::static_type()
3096     }
3097 }
3098 
3099 #[cfg(any(feature = "v2_66", feature = "dox"))]
3100 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3101 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3102 #[non_exhaustive]
3103 #[doc(alias = "GTlsChannelBindingType")]
3104 pub enum TlsChannelBindingType {
3105     #[doc(alias = "G_TLS_CHANNEL_BINDING_TLS_UNIQUE")]
3106     Unique,
3107     #[doc(alias = "G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT")]
3108     ServerEndPoint,
3109     #[doc(hidden)]
3110     __Unknown(i32),
3111 }
3112 
3113 #[cfg(any(feature = "v2_66", feature = "dox"))]
3114 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3115 impl fmt::Display for TlsChannelBindingType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3116     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3117         write!(
3118             f,
3119             "TlsChannelBindingType::{}",
3120             match *self {
3121                 Self::Unique => "Unique",
3122                 Self::ServerEndPoint => "ServerEndPoint",
3123                 _ => "Unknown",
3124             }
3125         )
3126     }
3127 }
3128 
3129 #[cfg(any(feature = "v2_66", feature = "dox"))]
3130 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3131 #[doc(hidden)]
3132 impl IntoGlib for TlsChannelBindingType {
3133     type GlibType = ffi::GTlsChannelBindingType;
3134 
into_glib(self) -> ffi::GTlsChannelBindingType3135     fn into_glib(self) -> ffi::GTlsChannelBindingType {
3136         match self {
3137             Self::Unique => ffi::G_TLS_CHANNEL_BINDING_TLS_UNIQUE,
3138             Self::ServerEndPoint => ffi::G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT,
3139             Self::__Unknown(value) => value,
3140         }
3141     }
3142 }
3143 
3144 #[cfg(any(feature = "v2_66", feature = "dox"))]
3145 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3146 #[doc(hidden)]
3147 impl FromGlib<ffi::GTlsChannelBindingType> for TlsChannelBindingType {
from_glib(value: ffi::GTlsChannelBindingType) -> Self3148     unsafe fn from_glib(value: ffi::GTlsChannelBindingType) -> Self {
3149         match value {
3150             ffi::G_TLS_CHANNEL_BINDING_TLS_UNIQUE => Self::Unique,
3151             ffi::G_TLS_CHANNEL_BINDING_TLS_SERVER_END_POINT => Self::ServerEndPoint,
3152             value => Self::__Unknown(value),
3153         }
3154     }
3155 }
3156 
3157 #[cfg(any(feature = "v2_66", feature = "dox"))]
3158 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3159 impl StaticType for TlsChannelBindingType {
static_type() -> Type3160     fn static_type() -> Type {
3161         unsafe { from_glib(ffi::g_tls_channel_binding_type_get_type()) }
3162     }
3163 }
3164 
3165 #[cfg(any(feature = "v2_66", feature = "dox"))]
3166 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3167 impl glib::value::ValueType for TlsChannelBindingType {
3168     type Type = Self;
3169 }
3170 
3171 #[cfg(any(feature = "v2_66", feature = "dox"))]
3172 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3173 unsafe impl<'a> FromValue<'a> for TlsChannelBindingType {
3174     type Checker = glib::value::GenericValueTypeChecker<Self>;
3175 
from_value(value: &'a glib::Value) -> Self3176     unsafe fn from_value(value: &'a glib::Value) -> Self {
3177         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3178     }
3179 }
3180 
3181 #[cfg(any(feature = "v2_66", feature = "dox"))]
3182 #[cfg_attr(feature = "dox", doc(cfg(feature = "v2_66")))]
3183 impl ToValue for TlsChannelBindingType {
to_value(&self) -> glib::Value3184     fn to_value(&self) -> glib::Value {
3185         let mut value = glib::Value::for_value_type::<Self>();
3186         unsafe {
3187             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3188         }
3189         value
3190     }
3191 
value_type(&self) -> glib::Type3192     fn value_type(&self) -> glib::Type {
3193         Self::static_type()
3194     }
3195 }
3196 
3197 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3198 #[non_exhaustive]
3199 #[doc(alias = "GTlsDatabaseLookupFlags")]
3200 pub enum TlsDatabaseLookupFlags {
3201     #[doc(alias = "G_TLS_DATABASE_LOOKUP_NONE")]
3202     None,
3203     #[doc(alias = "G_TLS_DATABASE_LOOKUP_KEYPAIR")]
3204     Keypair,
3205     #[doc(hidden)]
3206     __Unknown(i32),
3207 }
3208 
3209 impl fmt::Display for TlsDatabaseLookupFlags {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3210     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3211         write!(
3212             f,
3213             "TlsDatabaseLookupFlags::{}",
3214             match *self {
3215                 Self::None => "None",
3216                 Self::Keypair => "Keypair",
3217                 _ => "Unknown",
3218             }
3219         )
3220     }
3221 }
3222 
3223 #[doc(hidden)]
3224 impl IntoGlib for TlsDatabaseLookupFlags {
3225     type GlibType = ffi::GTlsDatabaseLookupFlags;
3226 
into_glib(self) -> ffi::GTlsDatabaseLookupFlags3227     fn into_glib(self) -> ffi::GTlsDatabaseLookupFlags {
3228         match self {
3229             Self::None => ffi::G_TLS_DATABASE_LOOKUP_NONE,
3230             Self::Keypair => ffi::G_TLS_DATABASE_LOOKUP_KEYPAIR,
3231             Self::__Unknown(value) => value,
3232         }
3233     }
3234 }
3235 
3236 #[doc(hidden)]
3237 impl FromGlib<ffi::GTlsDatabaseLookupFlags> for TlsDatabaseLookupFlags {
from_glib(value: ffi::GTlsDatabaseLookupFlags) -> Self3238     unsafe fn from_glib(value: ffi::GTlsDatabaseLookupFlags) -> Self {
3239         match value {
3240             ffi::G_TLS_DATABASE_LOOKUP_NONE => Self::None,
3241             ffi::G_TLS_DATABASE_LOOKUP_KEYPAIR => Self::Keypair,
3242             value => Self::__Unknown(value),
3243         }
3244     }
3245 }
3246 
3247 impl StaticType for TlsDatabaseLookupFlags {
static_type() -> Type3248     fn static_type() -> Type {
3249         unsafe { from_glib(ffi::g_tls_database_lookup_flags_get_type()) }
3250     }
3251 }
3252 
3253 impl glib::value::ValueType for TlsDatabaseLookupFlags {
3254     type Type = Self;
3255 }
3256 
3257 unsafe impl<'a> FromValue<'a> for TlsDatabaseLookupFlags {
3258     type Checker = glib::value::GenericValueTypeChecker<Self>;
3259 
from_value(value: &'a glib::Value) -> Self3260     unsafe fn from_value(value: &'a glib::Value) -> Self {
3261         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3262     }
3263 }
3264 
3265 impl ToValue for TlsDatabaseLookupFlags {
to_value(&self) -> glib::Value3266     fn to_value(&self) -> glib::Value {
3267         let mut value = glib::Value::for_value_type::<Self>();
3268         unsafe {
3269             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3270         }
3271         value
3272     }
3273 
value_type(&self) -> glib::Type3274     fn value_type(&self) -> glib::Type {
3275         Self::static_type()
3276     }
3277 }
3278 
3279 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3280 #[non_exhaustive]
3281 #[doc(alias = "GTlsInteractionResult")]
3282 pub enum TlsInteractionResult {
3283     #[doc(alias = "G_TLS_INTERACTION_UNHANDLED")]
3284     Unhandled,
3285     #[doc(alias = "G_TLS_INTERACTION_HANDLED")]
3286     Handled,
3287     #[doc(alias = "G_TLS_INTERACTION_FAILED")]
3288     Failed,
3289     #[doc(hidden)]
3290     __Unknown(i32),
3291 }
3292 
3293 impl fmt::Display for TlsInteractionResult {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3294     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3295         write!(
3296             f,
3297             "TlsInteractionResult::{}",
3298             match *self {
3299                 Self::Unhandled => "Unhandled",
3300                 Self::Handled => "Handled",
3301                 Self::Failed => "Failed",
3302                 _ => "Unknown",
3303             }
3304         )
3305     }
3306 }
3307 
3308 #[doc(hidden)]
3309 impl IntoGlib for TlsInteractionResult {
3310     type GlibType = ffi::GTlsInteractionResult;
3311 
into_glib(self) -> ffi::GTlsInteractionResult3312     fn into_glib(self) -> ffi::GTlsInteractionResult {
3313         match self {
3314             Self::Unhandled => ffi::G_TLS_INTERACTION_UNHANDLED,
3315             Self::Handled => ffi::G_TLS_INTERACTION_HANDLED,
3316             Self::Failed => ffi::G_TLS_INTERACTION_FAILED,
3317             Self::__Unknown(value) => value,
3318         }
3319     }
3320 }
3321 
3322 #[doc(hidden)]
3323 impl FromGlib<ffi::GTlsInteractionResult> for TlsInteractionResult {
from_glib(value: ffi::GTlsInteractionResult) -> Self3324     unsafe fn from_glib(value: ffi::GTlsInteractionResult) -> Self {
3325         match value {
3326             ffi::G_TLS_INTERACTION_UNHANDLED => Self::Unhandled,
3327             ffi::G_TLS_INTERACTION_HANDLED => Self::Handled,
3328             ffi::G_TLS_INTERACTION_FAILED => Self::Failed,
3329             value => Self::__Unknown(value),
3330         }
3331     }
3332 }
3333 
3334 impl StaticType for TlsInteractionResult {
static_type() -> Type3335     fn static_type() -> Type {
3336         unsafe { from_glib(ffi::g_tls_interaction_result_get_type()) }
3337     }
3338 }
3339 
3340 impl glib::value::ValueType for TlsInteractionResult {
3341     type Type = Self;
3342 }
3343 
3344 unsafe impl<'a> FromValue<'a> for TlsInteractionResult {
3345     type Checker = glib::value::GenericValueTypeChecker<Self>;
3346 
from_value(value: &'a glib::Value) -> Self3347     unsafe fn from_value(value: &'a glib::Value) -> Self {
3348         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3349     }
3350 }
3351 
3352 impl ToValue for TlsInteractionResult {
to_value(&self) -> glib::Value3353     fn to_value(&self) -> glib::Value {
3354         let mut value = glib::Value::for_value_type::<Self>();
3355         unsafe {
3356             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3357         }
3358         value
3359     }
3360 
value_type(&self) -> glib::Type3361     fn value_type(&self) -> glib::Type {
3362         Self::static_type()
3363     }
3364 }
3365 
3366 #[cfg_attr(feature = "v2_60", deprecated = "Since 2.60")]
3367 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3368 #[non_exhaustive]
3369 #[doc(alias = "GTlsRehandshakeMode")]
3370 pub enum TlsRehandshakeMode {
3371     #[doc(alias = "G_TLS_REHANDSHAKE_NEVER")]
3372     Never,
3373     #[doc(alias = "G_TLS_REHANDSHAKE_SAFELY")]
3374     Safely,
3375     #[doc(alias = "G_TLS_REHANDSHAKE_UNSAFELY")]
3376     Unsafely,
3377     #[doc(hidden)]
3378     __Unknown(i32),
3379 }
3380 
3381 impl fmt::Display for TlsRehandshakeMode {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3382     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3383         write!(
3384             f,
3385             "TlsRehandshakeMode::{}",
3386             match *self {
3387                 Self::Never => "Never",
3388                 Self::Safely => "Safely",
3389                 Self::Unsafely => "Unsafely",
3390                 _ => "Unknown",
3391             }
3392         )
3393     }
3394 }
3395 
3396 #[doc(hidden)]
3397 impl IntoGlib for TlsRehandshakeMode {
3398     type GlibType = ffi::GTlsRehandshakeMode;
3399 
into_glib(self) -> ffi::GTlsRehandshakeMode3400     fn into_glib(self) -> ffi::GTlsRehandshakeMode {
3401         match self {
3402             Self::Never => ffi::G_TLS_REHANDSHAKE_NEVER,
3403             Self::Safely => ffi::G_TLS_REHANDSHAKE_SAFELY,
3404             Self::Unsafely => ffi::G_TLS_REHANDSHAKE_UNSAFELY,
3405             Self::__Unknown(value) => value,
3406         }
3407     }
3408 }
3409 
3410 #[doc(hidden)]
3411 impl FromGlib<ffi::GTlsRehandshakeMode> for TlsRehandshakeMode {
from_glib(value: ffi::GTlsRehandshakeMode) -> Self3412     unsafe fn from_glib(value: ffi::GTlsRehandshakeMode) -> Self {
3413         match value {
3414             ffi::G_TLS_REHANDSHAKE_NEVER => Self::Never,
3415             ffi::G_TLS_REHANDSHAKE_SAFELY => Self::Safely,
3416             ffi::G_TLS_REHANDSHAKE_UNSAFELY => Self::Unsafely,
3417             value => Self::__Unknown(value),
3418         }
3419     }
3420 }
3421 
3422 impl StaticType for TlsRehandshakeMode {
static_type() -> Type3423     fn static_type() -> Type {
3424         unsafe { from_glib(ffi::g_tls_rehandshake_mode_get_type()) }
3425     }
3426 }
3427 
3428 impl glib::value::ValueType for TlsRehandshakeMode {
3429     type Type = Self;
3430 }
3431 
3432 unsafe impl<'a> FromValue<'a> for TlsRehandshakeMode {
3433     type Checker = glib::value::GenericValueTypeChecker<Self>;
3434 
from_value(value: &'a glib::Value) -> Self3435     unsafe fn from_value(value: &'a glib::Value) -> Self {
3436         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3437     }
3438 }
3439 
3440 impl ToValue for TlsRehandshakeMode {
to_value(&self) -> glib::Value3441     fn to_value(&self) -> glib::Value {
3442         let mut value = glib::Value::for_value_type::<Self>();
3443         unsafe {
3444             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3445         }
3446         value
3447     }
3448 
value_type(&self) -> glib::Type3449     fn value_type(&self) -> glib::Type {
3450         Self::static_type()
3451     }
3452 }
3453 
3454 #[cfg(any(unix, feature = "dox"))]
3455 #[cfg_attr(feature = "dox", doc(cfg(unix)))]
3456 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3457 #[non_exhaustive]
3458 #[doc(alias = "GUnixSocketAddressType")]
3459 pub enum UnixSocketAddressType {
3460     #[doc(alias = "G_UNIX_SOCKET_ADDRESS_INVALID")]
3461     Invalid,
3462     #[doc(alias = "G_UNIX_SOCKET_ADDRESS_ANONYMOUS")]
3463     Anonymous,
3464     #[doc(alias = "G_UNIX_SOCKET_ADDRESS_PATH")]
3465     Path,
3466     #[doc(alias = "G_UNIX_SOCKET_ADDRESS_ABSTRACT")]
3467     Abstract,
3468     #[doc(alias = "G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED")]
3469     AbstractPadded,
3470     #[doc(hidden)]
3471     __Unknown(i32),
3472 }
3473 
3474 #[cfg(any(unix, feature = "dox"))]
3475 impl fmt::Display for UnixSocketAddressType {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3476     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3477         write!(
3478             f,
3479             "UnixSocketAddressType::{}",
3480             match *self {
3481                 Self::Invalid => "Invalid",
3482                 Self::Anonymous => "Anonymous",
3483                 Self::Path => "Path",
3484                 Self::Abstract => "Abstract",
3485                 Self::AbstractPadded => "AbstractPadded",
3486                 _ => "Unknown",
3487             }
3488         )
3489     }
3490 }
3491 
3492 #[cfg(any(unix, feature = "dox"))]
3493 #[doc(hidden)]
3494 impl IntoGlib for UnixSocketAddressType {
3495     type GlibType = ffi::GUnixSocketAddressType;
3496 
into_glib(self) -> ffi::GUnixSocketAddressType3497     fn into_glib(self) -> ffi::GUnixSocketAddressType {
3498         match self {
3499             Self::Invalid => ffi::G_UNIX_SOCKET_ADDRESS_INVALID,
3500             Self::Anonymous => ffi::G_UNIX_SOCKET_ADDRESS_ANONYMOUS,
3501             Self::Path => ffi::G_UNIX_SOCKET_ADDRESS_PATH,
3502             Self::Abstract => ffi::G_UNIX_SOCKET_ADDRESS_ABSTRACT,
3503             Self::AbstractPadded => ffi::G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED,
3504             Self::__Unknown(value) => value,
3505         }
3506     }
3507 }
3508 
3509 #[cfg(any(unix, feature = "dox"))]
3510 #[doc(hidden)]
3511 impl FromGlib<ffi::GUnixSocketAddressType> for UnixSocketAddressType {
from_glib(value: ffi::GUnixSocketAddressType) -> Self3512     unsafe fn from_glib(value: ffi::GUnixSocketAddressType) -> Self {
3513         match value {
3514             ffi::G_UNIX_SOCKET_ADDRESS_INVALID => Self::Invalid,
3515             ffi::G_UNIX_SOCKET_ADDRESS_ANONYMOUS => Self::Anonymous,
3516             ffi::G_UNIX_SOCKET_ADDRESS_PATH => Self::Path,
3517             ffi::G_UNIX_SOCKET_ADDRESS_ABSTRACT => Self::Abstract,
3518             ffi::G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED => Self::AbstractPadded,
3519             value => Self::__Unknown(value),
3520         }
3521     }
3522 }
3523 
3524 #[cfg(any(unix, feature = "dox"))]
3525 impl StaticType for UnixSocketAddressType {
static_type() -> Type3526     fn static_type() -> Type {
3527         unsafe { from_glib(ffi::g_unix_socket_address_type_get_type()) }
3528     }
3529 }
3530 
3531 #[cfg(any(unix, feature = "dox"))]
3532 impl glib::value::ValueType for UnixSocketAddressType {
3533     type Type = Self;
3534 }
3535 
3536 #[cfg(any(unix, feature = "dox"))]
3537 unsafe impl<'a> FromValue<'a> for UnixSocketAddressType {
3538     type Checker = glib::value::GenericValueTypeChecker<Self>;
3539 
from_value(value: &'a glib::Value) -> Self3540     unsafe fn from_value(value: &'a glib::Value) -> Self {
3541         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3542     }
3543 }
3544 
3545 #[cfg(any(unix, feature = "dox"))]
3546 impl ToValue for UnixSocketAddressType {
to_value(&self) -> glib::Value3547     fn to_value(&self) -> glib::Value {
3548         let mut value = glib::Value::for_value_type::<Self>();
3549         unsafe {
3550             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3551         }
3552         value
3553     }
3554 
value_type(&self) -> glib::Type3555     fn value_type(&self) -> glib::Type {
3556         Self::static_type()
3557     }
3558 }
3559 
3560 #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
3561 #[non_exhaustive]
3562 #[doc(alias = "GZlibCompressorFormat")]
3563 pub enum ZlibCompressorFormat {
3564     #[doc(alias = "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")]
3565     Zlib,
3566     #[doc(alias = "G_ZLIB_COMPRESSOR_FORMAT_GZIP")]
3567     Gzip,
3568     #[doc(alias = "G_ZLIB_COMPRESSOR_FORMAT_RAW")]
3569     Raw,
3570     #[doc(hidden)]
3571     __Unknown(i32),
3572 }
3573 
3574 impl fmt::Display for ZlibCompressorFormat {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result3575     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3576         write!(
3577             f,
3578             "ZlibCompressorFormat::{}",
3579             match *self {
3580                 Self::Zlib => "Zlib",
3581                 Self::Gzip => "Gzip",
3582                 Self::Raw => "Raw",
3583                 _ => "Unknown",
3584             }
3585         )
3586     }
3587 }
3588 
3589 #[doc(hidden)]
3590 impl IntoGlib for ZlibCompressorFormat {
3591     type GlibType = ffi::GZlibCompressorFormat;
3592 
into_glib(self) -> ffi::GZlibCompressorFormat3593     fn into_glib(self) -> ffi::GZlibCompressorFormat {
3594         match self {
3595             Self::Zlib => ffi::G_ZLIB_COMPRESSOR_FORMAT_ZLIB,
3596             Self::Gzip => ffi::G_ZLIB_COMPRESSOR_FORMAT_GZIP,
3597             Self::Raw => ffi::G_ZLIB_COMPRESSOR_FORMAT_RAW,
3598             Self::__Unknown(value) => value,
3599         }
3600     }
3601 }
3602 
3603 #[doc(hidden)]
3604 impl FromGlib<ffi::GZlibCompressorFormat> for ZlibCompressorFormat {
from_glib(value: ffi::GZlibCompressorFormat) -> Self3605     unsafe fn from_glib(value: ffi::GZlibCompressorFormat) -> Self {
3606         match value {
3607             ffi::G_ZLIB_COMPRESSOR_FORMAT_ZLIB => Self::Zlib,
3608             ffi::G_ZLIB_COMPRESSOR_FORMAT_GZIP => Self::Gzip,
3609             ffi::G_ZLIB_COMPRESSOR_FORMAT_RAW => Self::Raw,
3610             value => Self::__Unknown(value),
3611         }
3612     }
3613 }
3614 
3615 impl StaticType for ZlibCompressorFormat {
static_type() -> Type3616     fn static_type() -> Type {
3617         unsafe { from_glib(ffi::g_zlib_compressor_format_get_type()) }
3618     }
3619 }
3620 
3621 impl glib::value::ValueType for ZlibCompressorFormat {
3622     type Type = Self;
3623 }
3624 
3625 unsafe impl<'a> FromValue<'a> for ZlibCompressorFormat {
3626     type Checker = glib::value::GenericValueTypeChecker<Self>;
3627 
from_value(value: &'a glib::Value) -> Self3628     unsafe fn from_value(value: &'a glib::Value) -> Self {
3629         from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
3630     }
3631 }
3632 
3633 impl ToValue for ZlibCompressorFormat {
to_value(&self) -> glib::Value3634     fn to_value(&self) -> glib::Value {
3635         let mut value = glib::Value::for_value_type::<Self>();
3636         unsafe {
3637             glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
3638         }
3639         value
3640     }
3641 
value_type(&self) -> glib::Type3642     fn value_type(&self) -> glib::Type {
3643         Self::static_type()
3644     }
3645 }
3646