nm_rs/auto/
setting_dummy.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir
3// from gtk-girs (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6use crate::{ffi,Setting};
7#[cfg(feature = "v1_8")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
9use glib::{prelude::*,translate::*};
10
11glib::wrapper! {
12    /// Dummy Link Settings
13    ///
14    /// # Implements
15    ///
16    /// [`SettingExt`][trait@crate::prelude::SettingExt]
17    #[doc(alias = "NMSettingDummy")]
18    pub struct SettingDummy(Object<ffi::NMSettingDummy, ffi::NMSettingDummyClass>) @extends Setting;
19
20    match fn {
21        type_ => || ffi::nm_setting_dummy_get_type(),
22    }
23}
24
25impl SettingDummy {
26    /// Creates a new #NMSettingDummy object with default values.
27    ///
28    /// # Returns
29    ///
30    /// the new empty #NMSettingDummy object
31    #[cfg(feature = "v1_8")]
32    #[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
33    #[doc(alias = "nm_setting_dummy_new")]
34    pub fn new() -> SettingDummy {
35        assert_initialized_main_thread!();
36        unsafe {
37            Setting::from_glib_full(ffi::nm_setting_dummy_new()).unsafe_cast()
38        }
39    }
40}
41
42#[cfg(feature = "v1_8")]
43#[cfg_attr(docsrs, doc(cfg(feature = "v1_8")))]
44impl Default for SettingDummy {
45                     fn default() -> Self {
46                         Self::new()
47                     }
48                 }