nm_rs/auto/
device_wpan.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,Device,Object};
7use glib::{prelude::*};
8
9glib::wrapper! {
10    ///
11    ///
12    /// # Implements
13    ///
14    /// [`DeviceExt`][trait@crate::prelude::DeviceExt], [`ObjectExt`][trait@crate::prelude::ObjectExt]
15    #[doc(alias = "NMDeviceWpan")]
16    pub struct DeviceWpan(Object<ffi::NMDeviceWpan, ffi::NMDeviceWpanClass>) @extends Device, Object;
17
18    match fn {
19        type_ => || ffi::nm_device_wpan_get_type(),
20    }
21}
22
23impl DeviceWpan {
24            // rustdoc-stripper-ignore-next
25            /// Creates a new builder-pattern struct instance to construct [`DeviceWpan`] objects.
26            ///
27            /// This method returns an instance of [`DeviceWpanBuilder`](crate::builders::DeviceWpanBuilder) which can be used to create [`DeviceWpan`] objects.
28            pub fn builder() -> DeviceWpanBuilder {
29                DeviceWpanBuilder::new()
30            }
31        
32}
33
34// rustdoc-stripper-ignore-next
35        /// A [builder-pattern] type to construct [`DeviceWpan`] objects.
36        ///
37        /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
38#[must_use = "The builder must be built to be used"]
39pub struct DeviceWpanBuilder {
40            builder: glib::object::ObjectBuilder<'static, DeviceWpan>,
41        }
42
43        impl DeviceWpanBuilder {
44        fn new() -> Self {
45            Self { builder: glib::object::Object::builder() }
46        }
47
48                            /// Whether the device can auto-activate a connection.
49                            ///
50                            /// The property setter is a synchronous D-Bus call. This is deprecated since 1.22.
51                            pub fn autoconnect(self, autoconnect: bool) -> Self {
52                            Self { builder: self.builder.property("autoconnect", autoconnect), }
53                        }
54
55    // rustdoc-stripper-ignore-next
56    /// Build the [`DeviceWpan`].
57    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
58    pub fn build(self) -> DeviceWpan {
59assert_initialized_main_thread!();
60    self.builder.build() }
61}