nm_rs/auto/setting_wired.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#![allow(deprecated)]
6
7use crate::{ffi,Setting};
8#[cfg(feature = "v1_2")]
9#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
10use crate::{SettingWiredWakeOnLan};
11#[cfg(feature = "v1_32")]
12#[cfg_attr(docsrs, doc(cfg(feature = "v1_32")))]
13use crate::{Ternary};
14use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
15use std::{boxed::Box as Box_};
16
17glib::wrapper! {
18 /// Wired Ethernet Settings
19 ///
20 /// ## Properties
21 ///
22 ///
23 /// #### `accept-all-mac-addresses`
24 /// When [`true`], setup the interface to accept packets for all MAC addresses.
25 /// This is enabling the kernel interface flag IFF_PROMISC.
26 /// When [`false`], the interface will only accept the packets with the
27 /// interface destination mac address or broadcast.
28 ///
29 /// Readable | Writeable
30 ///
31 ///
32 /// #### `auto-negotiate`
33 /// When [`true`], enforce auto-negotiation of speed and duplex mode.
34 /// If "speed" and "duplex" properties are both specified, only that
35 /// single mode will be advertised and accepted during the link
36 /// auto-negotiation process: this works only for BASE-T 802.3 specifications
37 /// and is useful for enforcing gigabits modes, as in these cases link
38 /// negotiation is mandatory.
39 /// When [`false`], "speed" and "duplex" properties should be both set or
40 /// link configuration will be skipped.
41 ///
42 /// Readable | Writeable
43 ///
44 ///
45 /// #### `cloned-mac-address`
46 /// If specified, request that the device use this MAC address instead.
47 /// This is known as MAC cloning or spoofing.
48 ///
49 /// Beside explicitly specifying a MAC address, the special values "preserve", "permanent",
50 /// "random" and "stable" are supported.
51 /// "preserve" means not to touch the MAC address on activation.
52 /// "permanent" means to use the permanent hardware address if the device
53 /// has one (otherwise this is treated as "preserve").
54 /// "random" creates a random MAC address on each connect.
55 /// "stable" creates a hashed MAC address based on connection.stable-id and a
56 /// machine dependent key.
57 ///
58 /// If unspecified, the value can be overwritten via global defaults, see manual
59 /// of NetworkManager.conf. If still unspecified, it defaults to "preserve"
60 /// (older versions of NetworkManager may use a different default value).
61 ///
62 /// On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated
63 /// "cloned-mac-address".
64 ///
65 /// Readable | Writeable
66 ///
67 ///
68 /// #### `duplex`
69 /// When a value is set, either "half" or "full", configures the device
70 /// to use the specified duplex mode. If "auto-negotiate" is "yes" the
71 /// specified duplex mode will be the only one advertised during link
72 /// negotiation: this works only for BASE-T 802.3 specifications and is
73 /// useful for enforcing gigabits modes, as in these cases link negotiation
74 /// is mandatory.
75 /// If the value is unset (the default), the link configuration will be
76 /// either skipped (if "auto-negotiate" is "no", the default) or will
77 /// be auto-negotiated (if "auto-negotiate" is "yes") and the local device
78 /// will advertise all the supported duplex modes.
79 /// Must be set together with the "speed" property if specified.
80 /// Before specifying a duplex mode be sure your device supports it.
81 ///
82 /// Readable | Writeable
83 ///
84 ///
85 /// #### `generate-mac-address-mask`
86 /// With #NMSettingWired:cloned-mac-address setting "random" or "stable",
87 /// by default all bits of the MAC address are scrambled and a locally-administered,
88 /// unicast MAC address is created. This property allows one to specify that certain bits
89 /// are fixed. Note that the least significant bit of the first MAC address will
90 /// always be unset to create a unicast MAC address.
91 ///
92 /// If the property is [`None`], it is eligible to be overwritten by a default
93 /// connection setting. If the value is still [`None`] or an empty string, the
94 /// default is to create a locally-administered, unicast MAC address.
95 ///
96 /// If the value contains one MAC address, this address is used as mask. The set
97 /// bits of the mask are to be filled with the current MAC address of the device,
98 /// while the unset bits are subject to randomization.
99 /// Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address
100 /// and only randomize the lower 3 bytes using the "random" or "stable" algorithm.
101 ///
102 /// If the value contains one additional MAC address after the mask,
103 /// this address is used instead of the current MAC address to fill the bits
104 /// that shall not be randomized. For example, a value of
105 /// "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address
106 /// to 68:F7:28, while the lower bits are randomized. A value of
107 /// "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled
108 /// globally-administered, burned-in MAC address.
109 ///
110 /// If the value contains more than one additional MAC addresses, one of
111 /// them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00"
112 /// will create a fully scrambled MAC address, randomly locally or globally
113 /// administered.
114 ///
115 /// Readable | Writeable
116 ///
117 ///
118 /// #### `mac-address`
119 /// If specified, this connection will only apply to the Ethernet device
120 /// whose permanent MAC address matches. This property does not change the
121 /// MAC address of the device (i.e. MAC spoofing).
122 ///
123 /// Readable | Writeable
124 ///
125 ///
126 /// #### `mac-address-blacklist`
127 /// If specified, this connection will never apply to the Ethernet device
128 /// whose permanent MAC address matches an address in the list. Each MAC
129 /// address is in the standard hex-digits-and-colons notation
130 /// (00:11:22:33:44:55).
131 ///
132 /// Readable | Writeable
133 ///
134 ///
135 /// #### `mac-address-denylist`
136 /// If specified, this connection will never apply to the Ethernet device
137 /// whose permanent MAC address matches an address in the list. Each MAC
138 /// address is in the standard hex-digits-and-colons notation
139 /// (00:11:22:33:44:55).
140 ///
141 /// Readable | Writeable
142 ///
143 ///
144 /// #### `mtu`
145 /// If non-zero, only transmit packets of the specified size or smaller,
146 /// breaking larger packets up into multiple Ethernet frames.
147 ///
148 /// Readable | Writeable
149 ///
150 ///
151 /// #### `port`
152 /// Specific port type to use if the device supports multiple
153 /// attachment methods. One of "tp" (Twisted Pair), "aui" (Attachment Unit
154 /// Interface), "bnc" (Thin Ethernet) or "mii" (Media Independent Interface).
155 /// If the device supports only one port type, this setting is ignored.
156 ///
157 /// Readable | Writeable
158 ///
159 ///
160 /// #### `s390-nettype`
161 /// s390 network device type; one of "qeth", "lcs", or "ctc", representing
162 /// the different types of virtual network devices available on s390 systems.
163 ///
164 /// Readable | Writeable
165 ///
166 ///
167 /// #### `s390-options`
168 /// Dictionary of key/value pairs of s390-specific device options. Both keys
169 /// and values must be strings. Allowed keys include "portno", "layer2",
170 /// "portname", "protocol", among others. Key names must contain only
171 /// alphanumeric characters (ie, [a-zA-Z0-9]).
172 ///
173 /// Currently, NetworkManager itself does nothing with this information.
174 /// However, s390utils ships a udev rule which parses this information
175 /// and applies it to the interface.
176 ///
177 /// Readable | Writeable
178 ///
179 ///
180 /// #### `s390-subchannels`
181 /// Identifies specific subchannels that this network device uses for
182 /// communication with z/VM or s390 host. Like the
183 /// #NMSettingWired:mac-address property for non-z/VM devices, this property
184 /// can be used to ensure this connection only applies to the network device
185 /// that uses these subchannels. The list should contain exactly 3 strings,
186 /// and each string may only be composed of hexadecimal characters and the
187 /// period (.) character.
188 ///
189 /// Readable | Writeable
190 ///
191 ///
192 /// #### `speed`
193 /// When a value greater than 0 is set, configures the device to use
194 /// the specified speed. If "auto-negotiate" is "yes" the specified
195 /// speed will be the only one advertised during link negotiation:
196 /// this works only for BASE-T 802.3 specifications and is useful for
197 /// enforcing gigabit speeds, as in this case link negotiation is
198 /// mandatory.
199 /// If the value is unset (0, the default), the link configuration will be
200 /// either skipped (if "auto-negotiate" is "no", the default) or will
201 /// be auto-negotiated (if "auto-negotiate" is "yes") and the local device
202 /// will advertise all the supported speeds.
203 /// In Mbit/s, ie 100 == 100Mbit/s.
204 /// Must be set together with the "duplex" property when non-zero.
205 /// Before specifying a speed value be sure your device supports it.
206 ///
207 /// Readable | Writeable
208 ///
209 ///
210 /// #### `wake-on-lan`
211 /// The #NMSettingWiredWakeOnLan options to enable. Not all devices support all options.
212 /// May be any combination of [`SettingWiredWakeOnLan::PHY`][crate::SettingWiredWakeOnLan::PHY],
213 /// [`SettingWiredWakeOnLan::UNICAST`][crate::SettingWiredWakeOnLan::UNICAST], [`SettingWiredWakeOnLan::MULTICAST`][crate::SettingWiredWakeOnLan::MULTICAST],
214 /// [`SettingWiredWakeOnLan::BROADCAST`][crate::SettingWiredWakeOnLan::BROADCAST], [`SettingWiredWakeOnLan::ARP`][crate::SettingWiredWakeOnLan::ARP],
215 /// [`SettingWiredWakeOnLan::MAGIC`][crate::SettingWiredWakeOnLan::MAGIC] or the special values
216 /// [`SettingWiredWakeOnLan::DEFAULT`][crate::SettingWiredWakeOnLan::DEFAULT] (to use global settings) and
217 /// [`SettingWiredWakeOnLan::IGNORE`][crate::SettingWiredWakeOnLan::IGNORE] (to disable management of Wake-on-LAN in
218 /// NetworkManager).
219 ///
220 /// Readable | Writeable
221 ///
222 ///
223 /// #### `wake-on-lan-password`
224 /// If specified, the password used with magic-packet-based
225 /// Wake-on-LAN, represented as an Ethernet MAC address. If [`None`],
226 /// no password will be required.
227 ///
228 /// Readable | Writeable
229 /// <details><summary><h4>Setting</h4></summary>
230 ///
231 ///
232 /// #### `name`
233 /// The setting's name, which uniquely identifies the setting within the
234 /// connection. Each setting type has a name unique to that type, for
235 /// example "ppp" or "802-11-wireless" or "802-3-ethernet".
236 ///
237 /// Readable
238 /// </details>
239 ///
240 /// # Implements
241 ///
242 /// [`SettingExt`][trait@crate::prelude::SettingExt]
243 #[doc(alias = "NMSettingWired")]
244 pub struct SettingWired(Object<ffi::NMSettingWired, ffi::NMSettingWiredClass>) @extends Setting;
245
246 match fn {
247 type_ => || ffi::nm_setting_wired_get_type(),
248 }
249}
250
251impl SettingWired {
252 /// Creates a new #NMSettingWired object with default values.
253 ///
254 /// # Returns
255 ///
256 /// the new empty #NMSettingWired object
257 #[doc(alias = "nm_setting_wired_new")]
258 pub fn new() -> SettingWired {
259 assert_initialized_main_thread!();
260 unsafe {
261 Setting::from_glib_full(ffi::nm_setting_wired_new()).unsafe_cast()
262 }
263 }
264
265 // rustdoc-stripper-ignore-next
266 /// Creates a new builder-pattern struct instance to construct [`SettingWired`] objects.
267 ///
268 /// This method returns an instance of [`SettingWiredBuilder`](crate::builders::SettingWiredBuilder) which can be used to create [`SettingWired`] objects.
269 pub fn builder() -> SettingWiredBuilder {
270 SettingWiredBuilder::new()
271 }
272
273
274 /// Adds a new MAC address to the #NMSettingWired:mac-address-blacklist property.
275 ///
276 /// # Deprecated since 1.48
277 ///
278 /// Use nm_setting_wired_add_mac_denylist_item() instead.
279 /// ## `mac`
280 /// the MAC address string (hex-digits-and-colons notation) to blacklist
281 ///
282 /// # Returns
283 ///
284 /// [`true`] if the MAC address was added; [`false`] if the MAC address
285 /// is invalid or was already present
286 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
287 #[allow(deprecated)]
288 #[doc(alias = "nm_setting_wired_add_mac_blacklist_item")]
289 pub fn add_mac_blacklist_item(&self, mac: &str) -> bool {
290 unsafe {
291 from_glib(ffi::nm_setting_wired_add_mac_blacklist_item(self.to_glib_none().0, mac.to_glib_none().0))
292 }
293 }
294
295 /// Adds a new MAC address to the #NMSettingWired:mac-address-denylist property.
296 /// ## `mac`
297 /// the MAC address string (hex-digits-and-colons notation) to denylist
298 ///
299 /// # Returns
300 ///
301 /// [`true`] if the MAC address was added; [`false`] if the MAC address
302 /// is invalid or was already present
303 #[cfg(feature = "v1_48")]
304 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
305 #[doc(alias = "nm_setting_wired_add_mac_denylist_item")]
306 pub fn add_mac_denylist_item(&self, mac: &str) -> bool {
307 unsafe {
308 from_glib(ffi::nm_setting_wired_add_mac_denylist_item(self.to_glib_none().0, mac.to_glib_none().0))
309 }
310 }
311
312 /// Add an option to the table. If the key already exists, the value gets
313 /// replaced.
314 ///
315 /// Before 1.32, the function would assert that the key is valid. Since then,
316 /// an invalid key gets silently added but renders the profile as invalid.
317 /// ## `key`
318 /// key name for the option
319 /// ## `value`
320 /// value for the option
321 ///
322 /// # Returns
323 ///
324 /// since 1.32 this always returns [`true`].
325 #[doc(alias = "nm_setting_wired_add_s390_option")]
326 pub fn add_s390_option(&self, key: &str, value: &str) -> bool {
327 unsafe {
328 from_glib(ffi::nm_setting_wired_add_s390_option(self.to_glib_none().0, key.to_glib_none().0, value.to_glib_none().0))
329 }
330 }
331
332 /// Removes all blacklisted MAC addresses.
333 ///
334 /// # Deprecated since 1.48
335 ///
336 /// Use nm_setting_wired_clear_mac_denylist_items() instead.
337 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
338 #[allow(deprecated)]
339 #[doc(alias = "nm_setting_wired_clear_mac_blacklist_items")]
340 pub fn clear_mac_blacklist_items(&self) {
341 unsafe {
342 ffi::nm_setting_wired_clear_mac_blacklist_items(self.to_glib_none().0);
343 }
344 }
345
346 /// Removes all denylisted MAC addresses.
347 #[cfg(feature = "v1_48")]
348 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
349 #[doc(alias = "nm_setting_wired_clear_mac_denylist_items")]
350 pub fn clear_mac_denylist_items(&self) {
351 unsafe {
352 ffi::nm_setting_wired_clear_mac_denylist_items(self.to_glib_none().0);
353 }
354 }
355
356 ///
357 /// # Returns
358 ///
359 /// the #NMSettingWired:accept-all-mac-addresses property of the setting
360 #[cfg(feature = "v1_32")]
361 #[cfg_attr(docsrs, doc(cfg(feature = "v1_32")))]
362 #[doc(alias = "nm_setting_wired_get_accept_all_mac_addresses")]
363 #[doc(alias = "get_accept_all_mac_addresses")]
364 #[doc(alias = "accept-all-mac-addresses")]
365 pub fn accept_all_mac_addresses(&self) -> Ternary {
366 unsafe {
367 from_glib(ffi::nm_setting_wired_get_accept_all_mac_addresses(self.to_glib_none().0))
368 }
369 }
370
371 ///
372 /// # Returns
373 ///
374 /// the #NMSettingWired:auto-negotiate property of the setting
375 #[doc(alias = "nm_setting_wired_get_auto_negotiate")]
376 #[doc(alias = "get_auto_negotiate")]
377 #[doc(alias = "auto-negotiate")]
378 pub fn is_auto_negotiate(&self) -> bool {
379 unsafe {
380 from_glib(ffi::nm_setting_wired_get_auto_negotiate(self.to_glib_none().0))
381 }
382 }
383
384 ///
385 /// # Returns
386 ///
387 /// the #NMSettingWired:cloned-mac-address property of the setting
388 #[doc(alias = "nm_setting_wired_get_cloned_mac_address")]
389 #[doc(alias = "get_cloned_mac_address")]
390 #[doc(alias = "cloned-mac-address")]
391 pub fn cloned_mac_address(&self) -> glib::GString {
392 unsafe {
393 from_glib_none(ffi::nm_setting_wired_get_cloned_mac_address(self.to_glib_none().0))
394 }
395 }
396
397 ///
398 /// # Returns
399 ///
400 /// the #NMSettingWired:duplex property of the setting
401 #[doc(alias = "nm_setting_wired_get_duplex")]
402 #[doc(alias = "get_duplex")]
403 pub fn duplex(&self) -> glib::GString {
404 unsafe {
405 from_glib_none(ffi::nm_setting_wired_get_duplex(self.to_glib_none().0))
406 }
407 }
408
409 ///
410 /// # Returns
411 ///
412 /// the #NMSettingWired:generate-mac-address-mask property of the setting
413 #[cfg(feature = "v1_4")]
414 #[cfg_attr(docsrs, doc(cfg(feature = "v1_4")))]
415 #[doc(alias = "nm_setting_wired_get_generate_mac_address_mask")]
416 #[doc(alias = "get_generate_mac_address_mask")]
417 #[doc(alias = "generate-mac-address-mask")]
418 pub fn generate_mac_address_mask(&self) -> glib::GString {
419 unsafe {
420 from_glib_none(ffi::nm_setting_wired_get_generate_mac_address_mask(self.to_glib_none().0))
421 }
422 }
423
424 ///
425 /// # Returns
426 ///
427 /// the #NMSettingWired:mac-address property of the setting
428 #[doc(alias = "nm_setting_wired_get_mac_address")]
429 #[doc(alias = "get_mac_address")]
430 #[doc(alias = "mac-address")]
431 pub fn mac_address(&self) -> glib::GString {
432 unsafe {
433 from_glib_none(ffi::nm_setting_wired_get_mac_address(self.to_glib_none().0))
434 }
435 }
436
437 ///
438 /// # Deprecated since 1.48
439 ///
440 /// Use nm_setting_wired_get_mac_address_denylist() instead.
441 ///
442 /// # Returns
443 ///
444 /// the #NMSettingWired:mac-address-blacklist property of the setting
445 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
446 #[allow(deprecated)]
447 #[doc(alias = "nm_setting_wired_get_mac_address_blacklist")]
448 #[doc(alias = "get_mac_address_blacklist")]
449 #[doc(alias = "mac-address-blacklist")]
450 pub fn mac_address_blacklist(&self) -> Vec<glib::GString> {
451 unsafe {
452 FromGlibPtrContainer::from_glib_none(ffi::nm_setting_wired_get_mac_address_blacklist(self.to_glib_none().0))
453 }
454 }
455
456 ///
457 /// # Returns
458 ///
459 /// the #NMSettingWired:mac-address-denylist property of the setting
460 #[cfg(feature = "v1_48")]
461 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
462 #[doc(alias = "nm_setting_wired_get_mac_address_denylist")]
463 #[doc(alias = "get_mac_address_denylist")]
464 #[doc(alias = "mac-address-denylist")]
465 pub fn mac_address_denylist(&self) -> Vec<glib::GString> {
466 unsafe {
467 FromGlibPtrContainer::from_glib_none(ffi::nm_setting_wired_get_mac_address_denylist(self.to_glib_none().0))
468 }
469 }
470
471 /// Since 1.48, access at index "len" is allowed and returns NULL.
472 ///
473 /// # Deprecated since 1.48
474 ///
475 /// Use nm_setting_wired_get_mac_denylist_item() instead.
476 /// ## `idx`
477 /// the zero-based index of the MAC address entry
478 ///
479 /// # Returns
480 ///
481 /// the blacklisted MAC address string (hex-digits-and-colons notation)
482 /// at index @idx
483 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
484 #[allow(deprecated)]
485 #[doc(alias = "nm_setting_wired_get_mac_blacklist_item")]
486 #[doc(alias = "get_mac_blacklist_item")]
487 pub fn mac_blacklist_item(&self, idx: u32) -> glib::GString {
488 unsafe {
489 from_glib_none(ffi::nm_setting_wired_get_mac_blacklist_item(self.to_glib_none().0, idx))
490 }
491 }
492
493 /// ## `idx`
494 /// the zero-based index of the MAC address entry
495 ///
496 /// # Returns
497 ///
498 /// the denylisted MAC address string (hex-digits-and-colons notation)
499 /// at index @idx
500 #[cfg(feature = "v1_48")]
501 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
502 #[doc(alias = "nm_setting_wired_get_mac_denylist_item")]
503 #[doc(alias = "get_mac_denylist_item")]
504 pub fn mac_denylist_item(&self, idx: u32) -> glib::GString {
505 unsafe {
506 from_glib_none(ffi::nm_setting_wired_get_mac_denylist_item(self.to_glib_none().0, idx))
507 }
508 }
509
510 ///
511 /// # Returns
512 ///
513 /// the #NMSettingWired:mtu property of the setting
514 #[doc(alias = "nm_setting_wired_get_mtu")]
515 #[doc(alias = "get_mtu")]
516 pub fn mtu(&self) -> u32 {
517 unsafe {
518 ffi::nm_setting_wired_get_mtu(self.to_glib_none().0)
519 }
520 }
521
522 ///
523 /// # Deprecated since 1.48
524 ///
525 /// Use nm_setting_wired_get_num_mac_denylist_items() instead.
526 ///
527 /// # Returns
528 ///
529 /// the number of blacklisted MAC addresses
530 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
531 #[allow(deprecated)]
532 #[doc(alias = "nm_setting_wired_get_num_mac_blacklist_items")]
533 #[doc(alias = "get_num_mac_blacklist_items")]
534 pub fn num_mac_blacklist_items(&self) -> u32 {
535 unsafe {
536 ffi::nm_setting_wired_get_num_mac_blacklist_items(self.to_glib_none().0)
537 }
538 }
539
540 ///
541 /// # Returns
542 ///
543 /// the number of denylisted MAC addresses
544 #[cfg(feature = "v1_48")]
545 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
546 #[doc(alias = "nm_setting_wired_get_num_mac_denylist_items")]
547 #[doc(alias = "get_num_mac_denylist_items")]
548 pub fn num_mac_denylist_items(&self) -> u32 {
549 unsafe {
550 ffi::nm_setting_wired_get_num_mac_denylist_items(self.to_glib_none().0)
551 }
552 }
553
554 /// Returns the number of s390-specific options that should be set for this
555 /// device when it is activated. This can be used to retrieve each s390
556 /// option individually using nm_setting_wired_get_s390_option().
557 ///
558 /// # Returns
559 ///
560 /// the number of s390-specific device options
561 #[doc(alias = "nm_setting_wired_get_num_s390_options")]
562 #[doc(alias = "get_num_s390_options")]
563 pub fn num_s390_options(&self) -> u32 {
564 unsafe {
565 ffi::nm_setting_wired_get_num_s390_options(self.to_glib_none().0)
566 }
567 }
568
569 ///
570 /// # Returns
571 ///
572 /// the #NMSettingWired:port property of the setting
573 #[doc(alias = "nm_setting_wired_get_port")]
574 #[doc(alias = "get_port")]
575 pub fn port(&self) -> glib::GString {
576 unsafe {
577 from_glib_none(ffi::nm_setting_wired_get_port(self.to_glib_none().0))
578 }
579 }
580
581 /// Returns the s390 device type this connection should apply to. Will be one
582 /// of 'qeth', 'lcs', or 'ctc'.
583 ///
584 /// # Returns
585 ///
586 /// the s390 device type
587 #[doc(alias = "nm_setting_wired_get_s390_nettype")]
588 #[doc(alias = "get_s390_nettype")]
589 #[doc(alias = "s390-nettype")]
590 pub fn s390_nettype(&self) -> glib::GString {
591 unsafe {
592 from_glib_none(ffi::nm_setting_wired_get_s390_nettype(self.to_glib_none().0))
593 }
594 }
595
596 /// Given an index, return the value of the s390 option at that index. indexes
597 /// are *not* guaranteed to be static across modifications to options done by
598 /// nm_setting_wired_add_s390_option() and nm_setting_wired_remove_s390_option(),
599 /// and should not be used to refer to options except for short periods of time
600 /// such as during option iteration.
601 /// ## `idx`
602 /// index of the desired option, from 0 to
603 /// nm_setting_wired_get_num_s390_options() - 1
604 ///
605 /// # Returns
606 ///
607 /// [`true`] on success if the index was valid and an option was found,
608 /// [`false`] if the index was invalid (ie, greater than the number of options
609 /// currently held by the setting)
610 ///
611 /// ## `out_key`
612 /// on return, the key
613 /// name of the s390 specific option; this value is owned by the setting and
614 /// should not be modified
615 ///
616 /// ## `out_value`
617 /// on return, the value
618 /// of the key of the s390 specific option; this value is owned by the setting
619 /// and should not be modified
620 #[doc(alias = "nm_setting_wired_get_s390_option")]
621 #[doc(alias = "get_s390_option")]
622 pub fn s390_option(&self, idx: u32) -> Option<(Option<glib::GString>, Option<glib::GString>)> {
623 unsafe {
624 let mut out_key = std::ptr::null();
625 let mut out_value = std::ptr::null();
626 let ret = from_glib(ffi::nm_setting_wired_get_s390_option(self.to_glib_none().0, idx, &mut out_key, &mut out_value));
627 if ret { Some((from_glib_none(out_key), from_glib_none(out_value))) } else { None }
628 }
629 }
630
631 /// Returns the value associated with the s390-specific option specified by
632 /// @key, if it exists.
633 /// ## `key`
634 /// the key for which to retrieve the value
635 ///
636 /// # Returns
637 ///
638 /// the value, or [`None`] if the key/value pair was never added to the
639 /// setting; the value is owned by the setting and must not be modified
640 #[doc(alias = "nm_setting_wired_get_s390_option_by_key")]
641 #[doc(alias = "get_s390_option_by_key")]
642 pub fn s390_option_by_key(&self, key: &str) -> glib::GString {
643 unsafe {
644 from_glib_none(ffi::nm_setting_wired_get_s390_option_by_key(self.to_glib_none().0, key.to_glib_none().0))
645 }
646 }
647
648 /// Return the list of s390 subchannels that identify the device that this
649 /// connection is applicable to. The connection should only be used in
650 /// conjunction with that device.
651 ///
652 /// # Returns
653 ///
654 /// array of strings, each specifying
655 /// one subchannel the s390 device uses to communicate to the host.
656 #[doc(alias = "nm_setting_wired_get_s390_subchannels")]
657 #[doc(alias = "get_s390_subchannels")]
658 #[doc(alias = "s390-subchannels")]
659 pub fn s390_subchannels(&self) -> Vec<glib::GString> {
660 unsafe {
661 FromGlibPtrContainer::from_glib_none(ffi::nm_setting_wired_get_s390_subchannels(self.to_glib_none().0))
662 }
663 }
664
665 ///
666 /// # Returns
667 ///
668 /// the #NMSettingWired:speed property of the setting
669 #[doc(alias = "nm_setting_wired_get_speed")]
670 #[doc(alias = "get_speed")]
671 pub fn speed(&self) -> u32 {
672 unsafe {
673 ffi::nm_setting_wired_get_speed(self.to_glib_none().0)
674 }
675 }
676
677 /// Returns a list of valid s390 options.
678 ///
679 /// The @self argument is unused and [`None`] may be passed instead.
680 ///
681 /// # Returns
682 ///
683 /// a [`None`]-terminated array of strings of valid s390 options.
684 #[doc(alias = "nm_setting_wired_get_valid_s390_options")]
685 #[doc(alias = "get_valid_s390_options")]
686 pub fn valid_s390_options(&self) -> Vec<glib::GString> {
687 unsafe {
688 FromGlibPtrContainer::from_glib_none(ffi::nm_setting_wired_get_valid_s390_options(self.to_glib_none().0))
689 }
690 }
691
692 /// Returns the Wake-on-LAN options enabled for the connection
693 ///
694 /// # Returns
695 ///
696 /// the Wake-on-LAN options
697 #[cfg(feature = "v1_2")]
698 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
699 #[doc(alias = "nm_setting_wired_get_wake_on_lan")]
700 #[doc(alias = "get_wake_on_lan")]
701 #[doc(alias = "wake-on-lan")]
702 pub fn wake_on_lan(&self) -> SettingWiredWakeOnLan {
703 unsafe {
704 from_glib(ffi::nm_setting_wired_get_wake_on_lan(self.to_glib_none().0))
705 }
706 }
707
708 /// Returns the Wake-on-LAN password. This only applies to
709 /// [`SettingWiredWakeOnLan::MAGIC`][crate::SettingWiredWakeOnLan::MAGIC].
710 ///
711 /// # Returns
712 ///
713 /// the Wake-on-LAN setting password, or [`None`] if there is no password.
714 #[cfg(feature = "v1_2")]
715 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
716 #[doc(alias = "nm_setting_wired_get_wake_on_lan_password")]
717 #[doc(alias = "get_wake_on_lan_password")]
718 #[doc(alias = "wake-on-lan-password")]
719 pub fn wake_on_lan_password(&self) -> glib::GString {
720 unsafe {
721 from_glib_none(ffi::nm_setting_wired_get_wake_on_lan_password(self.to_glib_none().0))
722 }
723 }
724
725 /// Removes the MAC address at index @idx from the blacklist.
726 ///
727 /// # Deprecated since 1.48
728 ///
729 /// Use nm_setting_wired_remove_mac_denylist_item() instead.
730 /// ## `idx`
731 /// index number of the MAC address
732 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
733 #[allow(deprecated)]
734 #[doc(alias = "nm_setting_wired_remove_mac_blacklist_item")]
735 pub fn remove_mac_blacklist_item(&self, idx: u32) {
736 unsafe {
737 ffi::nm_setting_wired_remove_mac_blacklist_item(self.to_glib_none().0, idx);
738 }
739 }
740
741 /// Removes the MAC address @mac from the blacklist.
742 ///
743 /// # Deprecated since 1.48
744 ///
745 /// Use nm_setting_wired_remove_mac_denylist_item_by_value() instead.
746 /// ## `mac`
747 /// the MAC address string (hex-digits-and-colons notation) to remove from
748 /// the blacklist
749 ///
750 /// # Returns
751 ///
752 /// [`true`] if the MAC address was found and removed; [`false`] if it was not.
753 #[cfg_attr(feature = "v1_48", deprecated = "Since 1.48")]
754 #[allow(deprecated)]
755 #[doc(alias = "nm_setting_wired_remove_mac_blacklist_item_by_value")]
756 pub fn remove_mac_blacklist_item_by_value(&self, mac: &str) -> bool {
757 unsafe {
758 from_glib(ffi::nm_setting_wired_remove_mac_blacklist_item_by_value(self.to_glib_none().0, mac.to_glib_none().0))
759 }
760 }
761
762 /// Removes the MAC address at index @idx from the denylist.
763 /// ## `idx`
764 /// index number of the MAC address
765 #[cfg(feature = "v1_48")]
766 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
767 #[doc(alias = "nm_setting_wired_remove_mac_denylist_item")]
768 pub fn remove_mac_denylist_item(&self, idx: u32) {
769 unsafe {
770 ffi::nm_setting_wired_remove_mac_denylist_item(self.to_glib_none().0, idx);
771 }
772 }
773
774 /// Removes the MAC address @mac from the denylist.
775 /// ## `mac`
776 /// the MAC address string (hex-digits-and-colons notation) to remove from
777 /// the denylist
778 ///
779 /// # Returns
780 ///
781 /// [`true`] if the MAC address was found and removed; [`false`] if it was not.
782 #[cfg(feature = "v1_48")]
783 #[cfg_attr(docsrs, doc(cfg(feature = "v1_48")))]
784 #[doc(alias = "nm_setting_wired_remove_mac_denylist_item_by_value")]
785 pub fn remove_mac_denylist_item_by_value(&self, mac: &str) -> bool {
786 unsafe {
787 from_glib(ffi::nm_setting_wired_remove_mac_denylist_item_by_value(self.to_glib_none().0, mac.to_glib_none().0))
788 }
789 }
790
791 /// Remove the s390-specific option referenced by @key from the internal option
792 /// list.
793 /// ## `key`
794 /// key name for the option to remove
795 ///
796 /// # Returns
797 ///
798 /// [`true`] if the option was found and removed from the internal option
799 /// list, [`false`] if it was not.
800 #[doc(alias = "nm_setting_wired_remove_s390_option")]
801 pub fn remove_s390_option(&self, key: &str) -> bool {
802 unsafe {
803 from_glib(ffi::nm_setting_wired_remove_s390_option(self.to_glib_none().0, key.to_glib_none().0))
804 }
805 }
806
807 /// When [`true`], setup the interface to accept packets for all MAC addresses.
808 /// This is enabling the kernel interface flag IFF_PROMISC.
809 /// When [`false`], the interface will only accept the packets with the
810 /// interface destination mac address or broadcast.
811 #[cfg(feature = "v1_32")]
812 #[cfg_attr(docsrs, doc(cfg(feature = "v1_32")))]
813 #[doc(alias = "accept-all-mac-addresses")]
814 pub fn set_accept_all_mac_addresses(&self, accept_all_mac_addresses: Ternary) {
815 ObjectExt::set_property(self,"accept-all-mac-addresses", accept_all_mac_addresses)
816 }
817
818 /// When [`true`], enforce auto-negotiation of speed and duplex mode.
819 /// If "speed" and "duplex" properties are both specified, only that
820 /// single mode will be advertised and accepted during the link
821 /// auto-negotiation process: this works only for BASE-T 802.3 specifications
822 /// and is useful for enforcing gigabits modes, as in these cases link
823 /// negotiation is mandatory.
824 /// When [`false`], "speed" and "duplex" properties should be both set or
825 /// link configuration will be skipped.
826 #[doc(alias = "auto-negotiate")]
827 pub fn set_auto_negotiate(&self, auto_negotiate: bool) {
828 ObjectExt::set_property(self,"auto-negotiate", auto_negotiate)
829 }
830
831 /// If specified, request that the device use this MAC address instead.
832 /// This is known as MAC cloning or spoofing.
833 ///
834 /// Beside explicitly specifying a MAC address, the special values "preserve", "permanent",
835 /// "random" and "stable" are supported.
836 /// "preserve" means not to touch the MAC address on activation.
837 /// "permanent" means to use the permanent hardware address if the device
838 /// has one (otherwise this is treated as "preserve").
839 /// "random" creates a random MAC address on each connect.
840 /// "stable" creates a hashed MAC address based on connection.stable-id and a
841 /// machine dependent key.
842 ///
843 /// If unspecified, the value can be overwritten via global defaults, see manual
844 /// of NetworkManager.conf. If still unspecified, it defaults to "preserve"
845 /// (older versions of NetworkManager may use a different default value).
846 ///
847 /// On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated
848 /// "cloned-mac-address".
849 #[doc(alias = "cloned-mac-address")]
850 pub fn set_cloned_mac_address(&self, cloned_mac_address: Option<&str>) {
851 ObjectExt::set_property(self,"cloned-mac-address", cloned_mac_address)
852 }
853
854 /// When a value is set, either "half" or "full", configures the device
855 /// to use the specified duplex mode. If "auto-negotiate" is "yes" the
856 /// specified duplex mode will be the only one advertised during link
857 /// negotiation: this works only for BASE-T 802.3 specifications and is
858 /// useful for enforcing gigabits modes, as in these cases link negotiation
859 /// is mandatory.
860 /// If the value is unset (the default), the link configuration will be
861 /// either skipped (if "auto-negotiate" is "no", the default) or will
862 /// be auto-negotiated (if "auto-negotiate" is "yes") and the local device
863 /// will advertise all the supported duplex modes.
864 /// Must be set together with the "speed" property if specified.
865 /// Before specifying a duplex mode be sure your device supports it.
866 pub fn set_duplex(&self, duplex: Option<&str>) {
867 ObjectExt::set_property(self,"duplex", duplex)
868 }
869
870 #[cfg(not(feature = "v1_4"))]
871 #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_4"))))]
872 #[doc(alias = "generate-mac-address-mask")]
873 pub fn generate_mac_address_mask(&self) -> Option<glib::GString> {
874 ObjectExt::property(self, "generate-mac-address-mask")
875 }
876
877 /// With #NMSettingWired:cloned-mac-address setting "random" or "stable",
878 /// by default all bits of the MAC address are scrambled and a locally-administered,
879 /// unicast MAC address is created. This property allows one to specify that certain bits
880 /// are fixed. Note that the least significant bit of the first MAC address will
881 /// always be unset to create a unicast MAC address.
882 ///
883 /// If the property is [`None`], it is eligible to be overwritten by a default
884 /// connection setting. If the value is still [`None`] or an empty string, the
885 /// default is to create a locally-administered, unicast MAC address.
886 ///
887 /// If the value contains one MAC address, this address is used as mask. The set
888 /// bits of the mask are to be filled with the current MAC address of the device,
889 /// while the unset bits are subject to randomization.
890 /// Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address
891 /// and only randomize the lower 3 bytes using the "random" or "stable" algorithm.
892 ///
893 /// If the value contains one additional MAC address after the mask,
894 /// this address is used instead of the current MAC address to fill the bits
895 /// that shall not be randomized. For example, a value of
896 /// "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address
897 /// to 68:F7:28, while the lower bits are randomized. A value of
898 /// "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled
899 /// globally-administered, burned-in MAC address.
900 ///
901 /// If the value contains more than one additional MAC addresses, one of
902 /// them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00"
903 /// will create a fully scrambled MAC address, randomly locally or globally
904 /// administered.
905 #[doc(alias = "generate-mac-address-mask")]
906 pub fn set_generate_mac_address_mask(&self, generate_mac_address_mask: Option<&str>) {
907 ObjectExt::set_property(self,"generate-mac-address-mask", generate_mac_address_mask)
908 }
909
910 /// If specified, this connection will only apply to the Ethernet device
911 /// whose permanent MAC address matches. This property does not change the
912 /// MAC address of the device (i.e. MAC spoofing).
913 #[doc(alias = "mac-address")]
914 pub fn set_mac_address(&self, mac_address: Option<&str>) {
915 ObjectExt::set_property(self,"mac-address", mac_address)
916 }
917
918 /// If specified, this connection will never apply to the Ethernet device
919 /// whose permanent MAC address matches an address in the list. Each MAC
920 /// address is in the standard hex-digits-and-colons notation
921 /// (00:11:22:33:44:55).
922 #[doc(alias = "mac-address-blacklist")]
923 pub fn set_mac_address_blacklist(&self, mac_address_blacklist: &[&str]) {
924 ObjectExt::set_property(self,"mac-address-blacklist", mac_address_blacklist)
925 }
926
927 #[cfg(not(feature = "v1_48"))]
928 #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_48"))))]
929 #[doc(alias = "mac-address-denylist")]
930 pub fn mac_address_denylist(&self) -> Vec<glib::GString> {
931 ObjectExt::property(self, "mac-address-denylist")
932 }
933
934 /// If specified, this connection will never apply to the Ethernet device
935 /// whose permanent MAC address matches an address in the list. Each MAC
936 /// address is in the standard hex-digits-and-colons notation
937 /// (00:11:22:33:44:55).
938 #[doc(alias = "mac-address-denylist")]
939 pub fn set_mac_address_denylist(&self, mac_address_denylist: &[&str]) {
940 ObjectExt::set_property(self,"mac-address-denylist", mac_address_denylist)
941 }
942
943 /// If non-zero, only transmit packets of the specified size or smaller,
944 /// breaking larger packets up into multiple Ethernet frames.
945 pub fn set_mtu(&self, mtu: u32) {
946 ObjectExt::set_property(self,"mtu", mtu)
947 }
948
949 /// Specific port type to use if the device supports multiple
950 /// attachment methods. One of "tp" (Twisted Pair), "aui" (Attachment Unit
951 /// Interface), "bnc" (Thin Ethernet) or "mii" (Media Independent Interface).
952 /// If the device supports only one port type, this setting is ignored.
953 pub fn set_port(&self, port: Option<&str>) {
954 ObjectExt::set_property(self,"port", port)
955 }
956
957 /// s390 network device type; one of "qeth", "lcs", or "ctc", representing
958 /// the different types of virtual network devices available on s390 systems.
959 #[doc(alias = "s390-nettype")]
960 pub fn set_s390_nettype(&self, s390_nettype: Option<&str>) {
961 ObjectExt::set_property(self,"s390-nettype", s390_nettype)
962 }
963
964 //#[doc(alias = "s390-options")]
965 //pub fn s390_options(&self) -> /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 } {
966 // ObjectExt::property(self, "s390-options")
967 //}
968
969 //#[doc(alias = "s390-options")]
970 //pub fn set_s390_options(&self, s390_options: /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }) {
971 // ObjectExt::set_property(self,"s390-options", s390_options)
972 //}
973
974 /// Identifies specific subchannels that this network device uses for
975 /// communication with z/VM or s390 host. Like the
976 /// #NMSettingWired:mac-address property for non-z/VM devices, this property
977 /// can be used to ensure this connection only applies to the network device
978 /// that uses these subchannels. The list should contain exactly 3 strings,
979 /// and each string may only be composed of hexadecimal characters and the
980 /// period (.) character.
981 #[doc(alias = "s390-subchannels")]
982 pub fn set_s390_subchannels(&self, s390_subchannels: &[&str]) {
983 ObjectExt::set_property(self,"s390-subchannels", s390_subchannels)
984 }
985
986 /// When a value greater than 0 is set, configures the device to use
987 /// the specified speed. If "auto-negotiate" is "yes" the specified
988 /// speed will be the only one advertised during link negotiation:
989 /// this works only for BASE-T 802.3 specifications and is useful for
990 /// enforcing gigabit speeds, as in this case link negotiation is
991 /// mandatory.
992 /// If the value is unset (0, the default), the link configuration will be
993 /// either skipped (if "auto-negotiate" is "no", the default) or will
994 /// be auto-negotiated (if "auto-negotiate" is "yes") and the local device
995 /// will advertise all the supported speeds.
996 /// In Mbit/s, ie 100 == 100Mbit/s.
997 /// Must be set together with the "duplex" property when non-zero.
998 /// Before specifying a speed value be sure your device supports it.
999 pub fn set_speed(&self, speed: u32) {
1000 ObjectExt::set_property(self,"speed", speed)
1001 }
1002
1003 /// The #NMSettingWiredWakeOnLan options to enable. Not all devices support all options.
1004 /// May be any combination of [`SettingWiredWakeOnLan::PHY`][crate::SettingWiredWakeOnLan::PHY],
1005 /// [`SettingWiredWakeOnLan::UNICAST`][crate::SettingWiredWakeOnLan::UNICAST], [`SettingWiredWakeOnLan::MULTICAST`][crate::SettingWiredWakeOnLan::MULTICAST],
1006 /// [`SettingWiredWakeOnLan::BROADCAST`][crate::SettingWiredWakeOnLan::BROADCAST], [`SettingWiredWakeOnLan::ARP`][crate::SettingWiredWakeOnLan::ARP],
1007 /// [`SettingWiredWakeOnLan::MAGIC`][crate::SettingWiredWakeOnLan::MAGIC] or the special values
1008 /// [`SettingWiredWakeOnLan::DEFAULT`][crate::SettingWiredWakeOnLan::DEFAULT] (to use global settings) and
1009 /// [`SettingWiredWakeOnLan::IGNORE`][crate::SettingWiredWakeOnLan::IGNORE] (to disable management of Wake-on-LAN in
1010 /// NetworkManager).
1011 #[cfg(feature = "v1_2")]
1012 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1013 #[doc(alias = "wake-on-lan")]
1014 pub fn set_wake_on_lan(&self, wake_on_lan: u32) {
1015 ObjectExt::set_property(self,"wake-on-lan", wake_on_lan)
1016 }
1017
1018 /// If specified, the password used with magic-packet-based
1019 /// Wake-on-LAN, represented as an Ethernet MAC address. If [`None`],
1020 /// no password will be required.
1021 #[cfg(feature = "v1_2")]
1022 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1023 #[doc(alias = "wake-on-lan-password")]
1024 pub fn set_wake_on_lan_password(&self, wake_on_lan_password: Option<&str>) {
1025 ObjectExt::set_property(self,"wake-on-lan-password", wake_on_lan_password)
1026 }
1027
1028 #[cfg(feature = "v1_32")]
1029 #[cfg_attr(docsrs, doc(cfg(feature = "v1_32")))]
1030 #[doc(alias = "accept-all-mac-addresses")]
1031 pub fn connect_accept_all_mac_addresses_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1032 unsafe extern "C" fn notify_accept_all_mac_addresses_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1033 let f: &F = &*(f as *const F);
1034 f(&from_glib_borrow(this))
1035 }
1036 unsafe {
1037 let f: Box_<F> = Box_::new(f);
1038 connect_raw(self.as_ptr() as *mut _, c"notify::accept-all-mac-addresses".as_ptr() as *const _,
1039 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_accept_all_mac_addresses_trampoline::<F> as *const ())), Box_::into_raw(f))
1040 }
1041 }
1042
1043 #[doc(alias = "auto-negotiate")]
1044 pub fn connect_auto_negotiate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1045 unsafe extern "C" fn notify_auto_negotiate_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1046 let f: &F = &*(f as *const F);
1047 f(&from_glib_borrow(this))
1048 }
1049 unsafe {
1050 let f: Box_<F> = Box_::new(f);
1051 connect_raw(self.as_ptr() as *mut _, c"notify::auto-negotiate".as_ptr() as *const _,
1052 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_auto_negotiate_trampoline::<F> as *const ())), Box_::into_raw(f))
1053 }
1054 }
1055
1056 #[doc(alias = "cloned-mac-address")]
1057 pub fn connect_cloned_mac_address_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1058 unsafe extern "C" fn notify_cloned_mac_address_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1059 let f: &F = &*(f as *const F);
1060 f(&from_glib_borrow(this))
1061 }
1062 unsafe {
1063 let f: Box_<F> = Box_::new(f);
1064 connect_raw(self.as_ptr() as *mut _, c"notify::cloned-mac-address".as_ptr() as *const _,
1065 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_cloned_mac_address_trampoline::<F> as *const ())), Box_::into_raw(f))
1066 }
1067 }
1068
1069 #[doc(alias = "duplex")]
1070 pub fn connect_duplex_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1071 unsafe extern "C" fn notify_duplex_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1072 let f: &F = &*(f as *const F);
1073 f(&from_glib_borrow(this))
1074 }
1075 unsafe {
1076 let f: Box_<F> = Box_::new(f);
1077 connect_raw(self.as_ptr() as *mut _, c"notify::duplex".as_ptr() as *const _,
1078 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_duplex_trampoline::<F> as *const ())), Box_::into_raw(f))
1079 }
1080 }
1081
1082 #[doc(alias = "generate-mac-address-mask")]
1083 pub fn connect_generate_mac_address_mask_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1084 unsafe extern "C" fn notify_generate_mac_address_mask_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1085 let f: &F = &*(f as *const F);
1086 f(&from_glib_borrow(this))
1087 }
1088 unsafe {
1089 let f: Box_<F> = Box_::new(f);
1090 connect_raw(self.as_ptr() as *mut _, c"notify::generate-mac-address-mask".as_ptr() as *const _,
1091 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_generate_mac_address_mask_trampoline::<F> as *const ())), Box_::into_raw(f))
1092 }
1093 }
1094
1095 #[doc(alias = "mac-address")]
1096 pub fn connect_mac_address_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1097 unsafe extern "C" fn notify_mac_address_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1098 let f: &F = &*(f as *const F);
1099 f(&from_glib_borrow(this))
1100 }
1101 unsafe {
1102 let f: Box_<F> = Box_::new(f);
1103 connect_raw(self.as_ptr() as *mut _, c"notify::mac-address".as_ptr() as *const _,
1104 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mac_address_trampoline::<F> as *const ())), Box_::into_raw(f))
1105 }
1106 }
1107
1108 #[doc(alias = "mac-address-blacklist")]
1109 pub fn connect_mac_address_blacklist_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1110 unsafe extern "C" fn notify_mac_address_blacklist_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1111 let f: &F = &*(f as *const F);
1112 f(&from_glib_borrow(this))
1113 }
1114 unsafe {
1115 let f: Box_<F> = Box_::new(f);
1116 connect_raw(self.as_ptr() as *mut _, c"notify::mac-address-blacklist".as_ptr() as *const _,
1117 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mac_address_blacklist_trampoline::<F> as *const ())), Box_::into_raw(f))
1118 }
1119 }
1120
1121 #[doc(alias = "mac-address-denylist")]
1122 pub fn connect_mac_address_denylist_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1123 unsafe extern "C" fn notify_mac_address_denylist_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1124 let f: &F = &*(f as *const F);
1125 f(&from_glib_borrow(this))
1126 }
1127 unsafe {
1128 let f: Box_<F> = Box_::new(f);
1129 connect_raw(self.as_ptr() as *mut _, c"notify::mac-address-denylist".as_ptr() as *const _,
1130 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mac_address_denylist_trampoline::<F> as *const ())), Box_::into_raw(f))
1131 }
1132 }
1133
1134 #[doc(alias = "mtu")]
1135 pub fn connect_mtu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1136 unsafe extern "C" fn notify_mtu_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1137 let f: &F = &*(f as *const F);
1138 f(&from_glib_borrow(this))
1139 }
1140 unsafe {
1141 let f: Box_<F> = Box_::new(f);
1142 connect_raw(self.as_ptr() as *mut _, c"notify::mtu".as_ptr() as *const _,
1143 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_mtu_trampoline::<F> as *const ())), Box_::into_raw(f))
1144 }
1145 }
1146
1147 #[doc(alias = "port")]
1148 pub fn connect_port_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1149 unsafe extern "C" fn notify_port_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1150 let f: &F = &*(f as *const F);
1151 f(&from_glib_borrow(this))
1152 }
1153 unsafe {
1154 let f: Box_<F> = Box_::new(f);
1155 connect_raw(self.as_ptr() as *mut _, c"notify::port".as_ptr() as *const _,
1156 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_port_trampoline::<F> as *const ())), Box_::into_raw(f))
1157 }
1158 }
1159
1160 #[doc(alias = "s390-nettype")]
1161 pub fn connect_s390_nettype_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1162 unsafe extern "C" fn notify_s390_nettype_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1163 let f: &F = &*(f as *const F);
1164 f(&from_glib_borrow(this))
1165 }
1166 unsafe {
1167 let f: Box_<F> = Box_::new(f);
1168 connect_raw(self.as_ptr() as *mut _, c"notify::s390-nettype".as_ptr() as *const _,
1169 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_s390_nettype_trampoline::<F> as *const ())), Box_::into_raw(f))
1170 }
1171 }
1172
1173 #[doc(alias = "s390-options")]
1174 pub fn connect_s390_options_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1175 unsafe extern "C" fn notify_s390_options_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1176 let f: &F = &*(f as *const F);
1177 f(&from_glib_borrow(this))
1178 }
1179 unsafe {
1180 let f: Box_<F> = Box_::new(f);
1181 connect_raw(self.as_ptr() as *mut _, c"notify::s390-options".as_ptr() as *const _,
1182 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_s390_options_trampoline::<F> as *const ())), Box_::into_raw(f))
1183 }
1184 }
1185
1186 #[doc(alias = "s390-subchannels")]
1187 pub fn connect_s390_subchannels_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1188 unsafe extern "C" fn notify_s390_subchannels_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1189 let f: &F = &*(f as *const F);
1190 f(&from_glib_borrow(this))
1191 }
1192 unsafe {
1193 let f: Box_<F> = Box_::new(f);
1194 connect_raw(self.as_ptr() as *mut _, c"notify::s390-subchannels".as_ptr() as *const _,
1195 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_s390_subchannels_trampoline::<F> as *const ())), Box_::into_raw(f))
1196 }
1197 }
1198
1199 #[doc(alias = "speed")]
1200 pub fn connect_speed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1201 unsafe extern "C" fn notify_speed_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1202 let f: &F = &*(f as *const F);
1203 f(&from_glib_borrow(this))
1204 }
1205 unsafe {
1206 let f: Box_<F> = Box_::new(f);
1207 connect_raw(self.as_ptr() as *mut _, c"notify::speed".as_ptr() as *const _,
1208 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_speed_trampoline::<F> as *const ())), Box_::into_raw(f))
1209 }
1210 }
1211
1212 #[cfg(feature = "v1_2")]
1213 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1214 #[doc(alias = "wake-on-lan")]
1215 pub fn connect_wake_on_lan_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1216 unsafe extern "C" fn notify_wake_on_lan_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1217 let f: &F = &*(f as *const F);
1218 f(&from_glib_borrow(this))
1219 }
1220 unsafe {
1221 let f: Box_<F> = Box_::new(f);
1222 connect_raw(self.as_ptr() as *mut _, c"notify::wake-on-lan".as_ptr() as *const _,
1223 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_wake_on_lan_trampoline::<F> as *const ())), Box_::into_raw(f))
1224 }
1225 }
1226
1227 #[cfg(feature = "v1_2")]
1228 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1229 #[doc(alias = "wake-on-lan-password")]
1230 pub fn connect_wake_on_lan_password_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1231 unsafe extern "C" fn notify_wake_on_lan_password_trampoline<F: Fn(&SettingWired) + 'static>(this: *mut ffi::NMSettingWired, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
1232 let f: &F = &*(f as *const F);
1233 f(&from_glib_borrow(this))
1234 }
1235 unsafe {
1236 let f: Box_<F> = Box_::new(f);
1237 connect_raw(self.as_ptr() as *mut _, c"notify::wake-on-lan-password".as_ptr() as *const _,
1238 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_wake_on_lan_password_trampoline::<F> as *const ())), Box_::into_raw(f))
1239 }
1240 }
1241}
1242
1243impl Default for SettingWired {
1244 fn default() -> Self {
1245 Self::new()
1246 }
1247 }
1248
1249// rustdoc-stripper-ignore-next
1250 /// A [builder-pattern] type to construct [`SettingWired`] objects.
1251 ///
1252 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
1253#[must_use = "The builder must be built to be used"]
1254pub struct SettingWiredBuilder {
1255 builder: glib::object::ObjectBuilder<'static, SettingWired>,
1256 }
1257
1258 impl SettingWiredBuilder {
1259 fn new() -> Self {
1260 Self { builder: glib::object::Object::builder() }
1261 }
1262
1263 /// When [`true`], setup the interface to accept packets for all MAC addresses.
1264 /// This is enabling the kernel interface flag IFF_PROMISC.
1265 /// When [`false`], the interface will only accept the packets with the
1266 /// interface destination mac address or broadcast.
1267 #[cfg(feature = "v1_32")]
1268 #[cfg_attr(docsrs, doc(cfg(feature = "v1_32")))]
1269 pub fn accept_all_mac_addresses(self, accept_all_mac_addresses: Ternary) -> Self {
1270 Self { builder: self.builder.property("accept-all-mac-addresses", accept_all_mac_addresses), }
1271 }
1272
1273 /// When [`true`], enforce auto-negotiation of speed and duplex mode.
1274 /// If "speed" and "duplex" properties are both specified, only that
1275 /// single mode will be advertised and accepted during the link
1276 /// auto-negotiation process: this works only for BASE-T 802.3 specifications
1277 /// and is useful for enforcing gigabits modes, as in these cases link
1278 /// negotiation is mandatory.
1279 /// When [`false`], "speed" and "duplex" properties should be both set or
1280 /// link configuration will be skipped.
1281 pub fn auto_negotiate(self, auto_negotiate: bool) -> Self {
1282 Self { builder: self.builder.property("auto-negotiate", auto_negotiate), }
1283 }
1284
1285 /// If specified, request that the device use this MAC address instead.
1286 /// This is known as MAC cloning or spoofing.
1287 ///
1288 /// Beside explicitly specifying a MAC address, the special values "preserve", "permanent",
1289 /// "random" and "stable" are supported.
1290 /// "preserve" means not to touch the MAC address on activation.
1291 /// "permanent" means to use the permanent hardware address if the device
1292 /// has one (otherwise this is treated as "preserve").
1293 /// "random" creates a random MAC address on each connect.
1294 /// "stable" creates a hashed MAC address based on connection.stable-id and a
1295 /// machine dependent key.
1296 ///
1297 /// If unspecified, the value can be overwritten via global defaults, see manual
1298 /// of NetworkManager.conf. If still unspecified, it defaults to "preserve"
1299 /// (older versions of NetworkManager may use a different default value).
1300 ///
1301 /// On D-Bus, this field is expressed as "assigned-mac-address" or the deprecated
1302 /// "cloned-mac-address".
1303 pub fn cloned_mac_address(self, cloned_mac_address: impl Into<glib::GString>) -> Self {
1304 Self { builder: self.builder.property("cloned-mac-address", cloned_mac_address.into()), }
1305 }
1306
1307 /// When a value is set, either "half" or "full", configures the device
1308 /// to use the specified duplex mode. If "auto-negotiate" is "yes" the
1309 /// specified duplex mode will be the only one advertised during link
1310 /// negotiation: this works only for BASE-T 802.3 specifications and is
1311 /// useful for enforcing gigabits modes, as in these cases link negotiation
1312 /// is mandatory.
1313 /// If the value is unset (the default), the link configuration will be
1314 /// either skipped (if "auto-negotiate" is "no", the default) or will
1315 /// be auto-negotiated (if "auto-negotiate" is "yes") and the local device
1316 /// will advertise all the supported duplex modes.
1317 /// Must be set together with the "speed" property if specified.
1318 /// Before specifying a duplex mode be sure your device supports it.
1319 pub fn duplex(self, duplex: impl Into<glib::GString>) -> Self {
1320 Self { builder: self.builder.property("duplex", duplex.into()), }
1321 }
1322
1323 /// With #NMSettingWired:cloned-mac-address setting "random" or "stable",
1324 /// by default all bits of the MAC address are scrambled and a locally-administered,
1325 /// unicast MAC address is created. This property allows one to specify that certain bits
1326 /// are fixed. Note that the least significant bit of the first MAC address will
1327 /// always be unset to create a unicast MAC address.
1328 ///
1329 /// If the property is [`None`], it is eligible to be overwritten by a default
1330 /// connection setting. If the value is still [`None`] or an empty string, the
1331 /// default is to create a locally-administered, unicast MAC address.
1332 ///
1333 /// If the value contains one MAC address, this address is used as mask. The set
1334 /// bits of the mask are to be filled with the current MAC address of the device,
1335 /// while the unset bits are subject to randomization.
1336 /// Setting "FE:FF:FF:00:00:00" means to preserve the OUI of the current MAC address
1337 /// and only randomize the lower 3 bytes using the "random" or "stable" algorithm.
1338 ///
1339 /// If the value contains one additional MAC address after the mask,
1340 /// this address is used instead of the current MAC address to fill the bits
1341 /// that shall not be randomized. For example, a value of
1342 /// "FE:FF:FF:00:00:00 68:F7:28:00:00:00" will set the OUI of the MAC address
1343 /// to 68:F7:28, while the lower bits are randomized. A value of
1344 /// "02:00:00:00:00:00 00:00:00:00:00:00" will create a fully scrambled
1345 /// globally-administered, burned-in MAC address.
1346 ///
1347 /// If the value contains more than one additional MAC addresses, one of
1348 /// them is chosen randomly. For example, "02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00"
1349 /// will create a fully scrambled MAC address, randomly locally or globally
1350 /// administered.
1351 pub fn generate_mac_address_mask(self, generate_mac_address_mask: impl Into<glib::GString>) -> Self {
1352 Self { builder: self.builder.property("generate-mac-address-mask", generate_mac_address_mask.into()), }
1353 }
1354
1355 /// If specified, this connection will only apply to the Ethernet device
1356 /// whose permanent MAC address matches. This property does not change the
1357 /// MAC address of the device (i.e. MAC spoofing).
1358 pub fn mac_address(self, mac_address: impl Into<glib::GString>) -> Self {
1359 Self { builder: self.builder.property("mac-address", mac_address.into()), }
1360 }
1361
1362 /// If specified, this connection will never apply to the Ethernet device
1363 /// whose permanent MAC address matches an address in the list. Each MAC
1364 /// address is in the standard hex-digits-and-colons notation
1365 /// (00:11:22:33:44:55).
1366 pub fn mac_address_blacklist(self, mac_address_blacklist: impl Into<glib::StrV>) -> Self {
1367 Self { builder: self.builder.property("mac-address-blacklist", mac_address_blacklist.into()), }
1368 }
1369
1370 /// If specified, this connection will never apply to the Ethernet device
1371 /// whose permanent MAC address matches an address in the list. Each MAC
1372 /// address is in the standard hex-digits-and-colons notation
1373 /// (00:11:22:33:44:55).
1374 pub fn mac_address_denylist(self, mac_address_denylist: impl Into<glib::StrV>) -> Self {
1375 Self { builder: self.builder.property("mac-address-denylist", mac_address_denylist.into()), }
1376 }
1377
1378 /// If non-zero, only transmit packets of the specified size or smaller,
1379 /// breaking larger packets up into multiple Ethernet frames.
1380 pub fn mtu(self, mtu: u32) -> Self {
1381 Self { builder: self.builder.property("mtu", mtu), }
1382 }
1383
1384 /// Specific port type to use if the device supports multiple
1385 /// attachment methods. One of "tp" (Twisted Pair), "aui" (Attachment Unit
1386 /// Interface), "bnc" (Thin Ethernet) or "mii" (Media Independent Interface).
1387 /// If the device supports only one port type, this setting is ignored.
1388 pub fn port(self, port: impl Into<glib::GString>) -> Self {
1389 Self { builder: self.builder.property("port", port.into()), }
1390 }
1391
1392 /// s390 network device type; one of "qeth", "lcs", or "ctc", representing
1393 /// the different types of virtual network devices available on s390 systems.
1394 pub fn s390_nettype(self, s390_nettype: impl Into<glib::GString>) -> Self {
1395 Self { builder: self.builder.property("s390-nettype", s390_nettype.into()), }
1396 }
1397
1398 //pub fn s390_options(self, s390_options: /*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 0, id: 28 }) -> Self {
1399 // Self { builder: self.builder.property("s390-options", s390_options), }
1400 //}
1401
1402 /// Identifies specific subchannels that this network device uses for
1403 /// communication with z/VM or s390 host. Like the
1404 /// #NMSettingWired:mac-address property for non-z/VM devices, this property
1405 /// can be used to ensure this connection only applies to the network device
1406 /// that uses these subchannels. The list should contain exactly 3 strings,
1407 /// and each string may only be composed of hexadecimal characters and the
1408 /// period (.) character.
1409 pub fn s390_subchannels(self, s390_subchannels: impl Into<glib::StrV>) -> Self {
1410 Self { builder: self.builder.property("s390-subchannels", s390_subchannels.into()), }
1411 }
1412
1413 /// When a value greater than 0 is set, configures the device to use
1414 /// the specified speed. If "auto-negotiate" is "yes" the specified
1415 /// speed will be the only one advertised during link negotiation:
1416 /// this works only for BASE-T 802.3 specifications and is useful for
1417 /// enforcing gigabit speeds, as in this case link negotiation is
1418 /// mandatory.
1419 /// If the value is unset (0, the default), the link configuration will be
1420 /// either skipped (if "auto-negotiate" is "no", the default) or will
1421 /// be auto-negotiated (if "auto-negotiate" is "yes") and the local device
1422 /// will advertise all the supported speeds.
1423 /// In Mbit/s, ie 100 == 100Mbit/s.
1424 /// Must be set together with the "duplex" property when non-zero.
1425 /// Before specifying a speed value be sure your device supports it.
1426 pub fn speed(self, speed: u32) -> Self {
1427 Self { builder: self.builder.property("speed", speed), }
1428 }
1429
1430 /// The #NMSettingWiredWakeOnLan options to enable. Not all devices support all options.
1431 /// May be any combination of [`SettingWiredWakeOnLan::PHY`][crate::SettingWiredWakeOnLan::PHY],
1432 /// [`SettingWiredWakeOnLan::UNICAST`][crate::SettingWiredWakeOnLan::UNICAST], [`SettingWiredWakeOnLan::MULTICAST`][crate::SettingWiredWakeOnLan::MULTICAST],
1433 /// [`SettingWiredWakeOnLan::BROADCAST`][crate::SettingWiredWakeOnLan::BROADCAST], [`SettingWiredWakeOnLan::ARP`][crate::SettingWiredWakeOnLan::ARP],
1434 /// [`SettingWiredWakeOnLan::MAGIC`][crate::SettingWiredWakeOnLan::MAGIC] or the special values
1435 /// [`SettingWiredWakeOnLan::DEFAULT`][crate::SettingWiredWakeOnLan::DEFAULT] (to use global settings) and
1436 /// [`SettingWiredWakeOnLan::IGNORE`][crate::SettingWiredWakeOnLan::IGNORE] (to disable management of Wake-on-LAN in
1437 /// NetworkManager).
1438 #[cfg(feature = "v1_2")]
1439 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1440 pub fn wake_on_lan(self, wake_on_lan: u32) -> Self {
1441 Self { builder: self.builder.property("wake-on-lan", wake_on_lan), }
1442 }
1443
1444 /// If specified, the password used with magic-packet-based
1445 /// Wake-on-LAN, represented as an Ethernet MAC address. If [`None`],
1446 /// no password will be required.
1447 #[cfg(feature = "v1_2")]
1448 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1449 pub fn wake_on_lan_password(self, wake_on_lan_password: impl Into<glib::GString>) -> Self {
1450 Self { builder: self.builder.property("wake-on-lan-password", wake_on_lan_password.into()), }
1451 }
1452
1453 // rustdoc-stripper-ignore-next
1454 /// Build the [`SettingWired`].
1455 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1456 pub fn build(self) -> SettingWired {
1457assert_initialized_main_thread!();
1458 self.builder.build() }
1459}