nm_rs/auto/device_ppp.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 = "NMDevicePpp")]
16 pub struct DevicePpp(Object<ffi::NMDevicePpp, ffi::NMDevicePppClass>) @extends Device, Object;
17
18 match fn {
19 type_ => || ffi::nm_device_ppp_get_type(),
20 }
21}
22
23impl DevicePpp {
24 // rustdoc-stripper-ignore-next
25 /// Creates a new builder-pattern struct instance to construct [`DevicePpp`] objects.
26 ///
27 /// This method returns an instance of [`DevicePppBuilder`](crate::builders::DevicePppBuilder) which can be used to create [`DevicePpp`] objects.
28 pub fn builder() -> DevicePppBuilder {
29 DevicePppBuilder::new()
30 }
31
32}
33
34// rustdoc-stripper-ignore-next
35 /// A [builder-pattern] type to construct [`DevicePpp`] 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 DevicePppBuilder {
40 builder: glib::object::ObjectBuilder<'static, DevicePpp>,
41 }
42
43 impl DevicePppBuilder {
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 [`DevicePpp`].
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) -> DevicePpp {
59assert_initialized_main_thread!();
60 self.builder.build() }
61}