1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir
// from gtk-girs (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::{ffi,Setting,VlanFlags,VlanPriorityMap};
use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
use std::{boxed::Box as Box_};
glib::wrapper! {
/// VLAN Settings
///
/// ## Properties
///
///
/// #### `egress-priority-map`
/// For outgoing packets, a list of mappings from Linux SKB priorities to
/// 802.1p priorities. The mapping is given in the format "from:to" where
/// both "from" and "to" are unsigned integers, ie "7:3".
///
/// Readable | Writeable
///
///
/// #### `flags`
/// One or more flags which control the behavior and features of the VLAN
/// interface. Flags include [`VlanFlags::REORDER_HEADERS`][crate::VlanFlags::REORDER_HEADERS] (reordering of
/// output packet headers), [`VlanFlags::GVRP`][crate::VlanFlags::GVRP] (use of the GVRP protocol),
/// and [`VlanFlags::LOOSE_BINDING`][crate::VlanFlags::LOOSE_BINDING] (loose binding of the interface to its
/// controller device's operating state). [`VlanFlags::MVRP`][crate::VlanFlags::MVRP] (use of the MVRP
/// protocol).
///
/// The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
/// but it used to be 0. To preserve backward compatibility, the default-value
/// in the D-Bus API continues to be 0 and a missing property on D-Bus
/// is still considered as 0.
///
/// Readable | Writeable
///
///
/// #### `id`
/// The VLAN identifier that the interface created by this connection should
/// be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
///
/// Readable | Writeable
///
///
/// #### `ingress-priority-map`
/// For incoming packets, a list of mappings from 802.1p priorities to Linux
/// SKB priorities. The mapping is given in the format "from:to" where both
/// "from" and "to" are unsigned integers, ie "7:3".
///
/// Readable | Writeable
///
///
/// #### `parent`
/// If given, specifies the parent interface name or parent connection UUID
/// from which this VLAN interface should be created. If this property is
/// not specified, the connection must contain an #NMSettingWired setting
/// with a #NMSettingWired:mac-address property.
///
/// Readable | Writeable
///
///
/// #### `protocol`
/// Specifies the VLAN protocol to use for encapsulation.
///
/// Supported values are: '802.1Q', '802.1ad'. If not specified the default
/// value is '802.1Q'.
///
/// Readable | Writeable
/// <details><summary><h4>Setting</h4></summary>
///
///
/// #### `name`
/// The setting's name, which uniquely identifies the setting within the
/// connection. Each setting type has a name unique to that type, for
/// example "ppp" or "802-11-wireless" or "802-3-ethernet".
///
/// Readable
/// </details>
///
/// # Implements
///
/// [`SettingExt`][trait@crate::prelude::SettingExt]
#[doc(alias = "NMSettingVlan")]
pub struct SettingVlan(Object<ffi::NMSettingVlan, ffi::NMSettingVlanClass>) @extends Setting;
match fn {
type_ => || ffi::nm_setting_vlan_get_type(),
}
}
impl SettingVlan {
/// Creates a new #NMSettingVlan object with default values.
///
/// # Returns
///
/// the new empty #NMSettingVlan object
#[doc(alias = "nm_setting_vlan_new")]
pub fn new() -> SettingVlan {
assert_initialized_main_thread!();
unsafe {
Setting::from_glib_full(ffi::nm_setting_vlan_new()).unsafe_cast()
}
}
// rustdoc-stripper-ignore-next
/// Creates a new builder-pattern struct instance to construct [`SettingVlan`] objects.
///
/// This method returns an instance of [`SettingVlanBuilder`](crate::builders::SettingVlanBuilder) which can be used to create [`SettingVlan`] objects.
pub fn builder() -> SettingVlanBuilder {
SettingVlanBuilder::new()
}
/// Adds a priority mapping to the #NMSettingVlan:ingress_priority_map or
/// #NMSettingVlan:egress_priority_map properties of the setting. If @from is
/// already in the given priority map, this function will overwrite the
/// existing entry with the new @to.
///
/// If @map is #NM_VLAN_INGRESS_MAP then @from is the incoming 802.1q VLAN
/// Priority Code Point (PCP) value, and @to is the Linux SKB priority value.
///
/// If @map is #NM_VLAN_EGRESS_MAP then @from is the Linux SKB priority value and
/// @to is the outgoing 802.1q VLAN Priority Code Point (PCP) value.
/// ## `map`
/// the type of priority map
/// ## `from`
/// the priority to map to @to
/// ## `to`
/// the priority to map @from to
///
/// # Returns
///
/// [`true`].
#[doc(alias = "nm_setting_vlan_add_priority")]
pub fn add_priority(&self, map: VlanPriorityMap, from: u32, to: u32) -> bool {
unsafe {
from_glib(ffi::nm_setting_vlan_add_priority(self.to_glib_none().0, map.into_glib(), from, to))
}
}
/// Adds a priority map entry into either the #NMSettingVlan:ingress_priority_map
/// or the #NMSettingVlan:egress_priority_map properties. The priority map maps
/// the Linux SKB priorities to 802.1p priorities.
/// ## `map`
/// the type of priority map
/// ## `str`
/// the string which contains a priority map, like "3:7"
///
/// # Returns
///
/// [`true`] if the entry was successfully added to the list, or it
/// overwrote the old value, [`false`] if @str is not a valid mapping.
#[doc(alias = "nm_setting_vlan_add_priority_str")]
pub fn add_priority_str(&self, map: VlanPriorityMap, str: &str) -> bool {
unsafe {
from_glib(ffi::nm_setting_vlan_add_priority_str(self.to_glib_none().0, map.into_glib(), str.to_glib_none().0))
}
}
/// Clear all the entries from #NMSettingVlan:ingress_priority_map or
/// #NMSettingVlan:egress_priority_map properties.
/// ## `map`
/// the type of priority map
#[doc(alias = "nm_setting_vlan_clear_priorities")]
pub fn clear_priorities(&self, map: VlanPriorityMap) {
unsafe {
ffi::nm_setting_vlan_clear_priorities(self.to_glib_none().0, map.into_glib());
}
}
///
/// # Returns
///
/// the #NMSettingVlan:flags property of the setting
#[doc(alias = "nm_setting_vlan_get_flags")]
#[doc(alias = "get_flags")]
pub fn flags(&self) -> u32 {
unsafe {
ffi::nm_setting_vlan_get_flags(self.to_glib_none().0)
}
}
///
/// # Returns
///
/// the #NMSettingVlan:id property of the setting
#[doc(alias = "nm_setting_vlan_get_id")]
#[doc(alias = "get_id")]
pub fn id(&self) -> u32 {
unsafe {
ffi::nm_setting_vlan_get_id(self.to_glib_none().0)
}
}
/// Returns the number of entries in the
/// #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
/// properties of this setting.
/// ## `map`
/// the type of priority map
///
/// # Returns
///
/// return the number of ingress/egress priority entries.
#[doc(alias = "nm_setting_vlan_get_num_priorities")]
#[doc(alias = "get_num_priorities")]
pub fn num_priorities(&self, map: VlanPriorityMap) -> i32 {
unsafe {
ffi::nm_setting_vlan_get_num_priorities(self.to_glib_none().0, map.into_glib())
}
}
///
/// # Returns
///
/// the #NMSettingVlan:parent property of the setting
#[doc(alias = "nm_setting_vlan_get_parent")]
#[doc(alias = "get_parent")]
pub fn parent(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::nm_setting_vlan_get_parent(self.to_glib_none().0))
}
}
/// Retrieve one of the entries of the #NMSettingVlan:ingress_priority_map
/// or #NMSettingVlan:egress_priority_map properties of this setting.
/// ## `map`
/// the type of priority map
/// ## `idx`
/// the zero-based index of the ingress/egress priority map entry
///
/// # Returns
///
/// returns [`true`] if @idx is in range. Otherwise, [`false`].
///
/// ## `out_from`
/// on return the value of the priority map's 'from' item
///
/// ## `out_to`
/// on return the value of priority map's 'to' item
#[doc(alias = "nm_setting_vlan_get_priority")]
#[doc(alias = "get_priority")]
pub fn priority(&self, map: VlanPriorityMap, idx: u32) -> Option<(u32, u32)> {
unsafe {
let mut out_from = std::mem::MaybeUninit::uninit();
let mut out_to = std::mem::MaybeUninit::uninit();
let ret = from_glib(ffi::nm_setting_vlan_get_priority(self.to_glib_none().0, map.into_glib(), idx, out_from.as_mut_ptr(), out_to.as_mut_ptr()));
if ret { Some((out_from.assume_init(), out_to.assume_init())) } else { None }
}
}
///
/// # Returns
///
/// the #NMSettingVlan:protocol property of the setting
#[cfg(feature = "v1_42")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
#[doc(alias = "nm_setting_vlan_get_protocol")]
#[doc(alias = "get_protocol")]
pub fn protocol(&self) -> glib::GString {
unsafe {
from_glib_none(ffi::nm_setting_vlan_get_protocol(self.to_glib_none().0))
}
}
/// Removes the priority map at index @idx from the
/// #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
/// properties.
/// ## `map`
/// the type of priority map
/// ## `idx`
/// the zero-based index of the priority map to remove
#[doc(alias = "nm_setting_vlan_remove_priority")]
pub fn remove_priority(&self, map: VlanPriorityMap, idx: u32) {
unsafe {
ffi::nm_setting_vlan_remove_priority(self.to_glib_none().0, map.into_glib(), idx);
}
}
/// Removes the priority map @form:@to from the #NMSettingVlan:ingress_priority_map
/// or #NMSettingVlan:egress_priority_map (according to @map argument)
/// properties.
/// ## `map`
/// the type of priority map
/// ## `from`
/// the priority to map to @to
/// ## `to`
/// the priority to map @from to
///
/// # Returns
///
/// [`true`] if the priority mapping was found and removed; [`false`] if it was not.
#[doc(alias = "nm_setting_vlan_remove_priority_by_value")]
pub fn remove_priority_by_value(&self, map: VlanPriorityMap, from: u32, to: u32) -> bool {
unsafe {
from_glib(ffi::nm_setting_vlan_remove_priority_by_value(self.to_glib_none().0, map.into_glib(), from, to))
}
}
/// Removes the priority map @str from the #NMSettingVlan:ingress_priority_map
/// or #NMSettingVlan:egress_priority_map (according to @map argument)
/// properties.
/// ## `map`
/// the type of priority map
/// ## `str`
/// the string which contains a priority map, like "3:7"
///
/// # Returns
///
/// [`true`] if the priority mapping was found and removed; [`false`] if it was not.
#[doc(alias = "nm_setting_vlan_remove_priority_str_by_value")]
pub fn remove_priority_str_by_value(&self, map: VlanPriorityMap, str: &str) -> bool {
unsafe {
from_glib(ffi::nm_setting_vlan_remove_priority_str_by_value(self.to_glib_none().0, map.into_glib(), str.to_glib_none().0))
}
}
/// For outgoing packets, a list of mappings from Linux SKB priorities to
/// 802.1p priorities. The mapping is given in the format "from:to" where
/// both "from" and "to" are unsigned integers, ie "7:3".
#[doc(alias = "egress-priority-map")]
pub fn egress_priority_map(&self) -> Vec<glib::GString> {
ObjectExt::property(self, "egress-priority-map")
}
/// For outgoing packets, a list of mappings from Linux SKB priorities to
/// 802.1p priorities. The mapping is given in the format "from:to" where
/// both "from" and "to" are unsigned integers, ie "7:3".
#[doc(alias = "egress-priority-map")]
pub fn set_egress_priority_map(&self, egress_priority_map: &[&str]) {
ObjectExt::set_property(self,"egress-priority-map", egress_priority_map)
}
/// One or more flags which control the behavior and features of the VLAN
/// interface. Flags include [`VlanFlags::REORDER_HEADERS`][crate::VlanFlags::REORDER_HEADERS] (reordering of
/// output packet headers), [`VlanFlags::GVRP`][crate::VlanFlags::GVRP] (use of the GVRP protocol),
/// and [`VlanFlags::LOOSE_BINDING`][crate::VlanFlags::LOOSE_BINDING] (loose binding of the interface to its
/// controller device's operating state). [`VlanFlags::MVRP`][crate::VlanFlags::MVRP] (use of the MVRP
/// protocol).
///
/// The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
/// but it used to be 0. To preserve backward compatibility, the default-value
/// in the D-Bus API continues to be 0 and a missing property on D-Bus
/// is still considered as 0.
pub fn set_flags(&self, flags: VlanFlags) {
ObjectExt::set_property(self,"flags", flags)
}
/// The VLAN identifier that the interface created by this connection should
/// be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
pub fn set_id(&self, id: u32) {
ObjectExt::set_property(self,"id", id)
}
/// For incoming packets, a list of mappings from 802.1p priorities to Linux
/// SKB priorities. The mapping is given in the format "from:to" where both
/// "from" and "to" are unsigned integers, ie "7:3".
#[doc(alias = "ingress-priority-map")]
pub fn ingress_priority_map(&self) -> Vec<glib::GString> {
ObjectExt::property(self, "ingress-priority-map")
}
/// For incoming packets, a list of mappings from 802.1p priorities to Linux
/// SKB priorities. The mapping is given in the format "from:to" where both
/// "from" and "to" are unsigned integers, ie "7:3".
#[doc(alias = "ingress-priority-map")]
pub fn set_ingress_priority_map(&self, ingress_priority_map: &[&str]) {
ObjectExt::set_property(self,"ingress-priority-map", ingress_priority_map)
}
/// If given, specifies the parent interface name or parent connection UUID
/// from which this VLAN interface should be created. If this property is
/// not specified, the connection must contain an #NMSettingWired setting
/// with a #NMSettingWired:mac-address property.
pub fn set_parent(&self, parent: Option<&str>) {
ObjectExt::set_property(self,"parent", parent)
}
/// Specifies the VLAN protocol to use for encapsulation.
///
/// Supported values are: '802.1Q', '802.1ad'. If not specified the default
/// value is '802.1Q'.
#[cfg(feature = "v1_42")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
pub fn set_protocol(&self, protocol: Option<&str>) {
ObjectExt::set_property(self,"protocol", protocol)
}
#[doc(alias = "egress-priority-map")]
pub fn connect_egress_priority_map_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_egress_priority_map_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, c"notify::egress-priority-map".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_egress_priority_map_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "flags")]
pub fn connect_flags_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_flags_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, c"notify::flags".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_flags_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "id")]
pub fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_id_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, c"notify::id".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_id_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "ingress-priority-map")]
pub fn connect_ingress_priority_map_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_ingress_priority_map_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, c"notify::ingress-priority-map".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_ingress_priority_map_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[doc(alias = "parent")]
pub fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_parent_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, c"notify::parent".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_parent_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
#[cfg(feature = "v1_42")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
#[doc(alias = "protocol")]
pub fn connect_protocol_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_protocol_trampoline<F: Fn(&SettingVlan) + 'static>(this: *mut ffi::NMSettingVlan, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, c"notify::protocol".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_protocol_trampoline::<F> as *const ())), Box_::into_raw(f))
}
}
}
impl Default for SettingVlan {
fn default() -> Self {
Self::new()
}
}
// rustdoc-stripper-ignore-next
/// A [builder-pattern] type to construct [`SettingVlan`] objects.
///
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
#[must_use = "The builder must be built to be used"]
pub struct SettingVlanBuilder {
builder: glib::object::ObjectBuilder<'static, SettingVlan>,
}
impl SettingVlanBuilder {
fn new() -> Self {
Self { builder: glib::object::Object::builder() }
}
/// For outgoing packets, a list of mappings from Linux SKB priorities to
/// 802.1p priorities. The mapping is given in the format "from:to" where
/// both "from" and "to" are unsigned integers, ie "7:3".
pub fn egress_priority_map(self, egress_priority_map: impl Into<glib::StrV>) -> Self {
Self { builder: self.builder.property("egress-priority-map", egress_priority_map.into()), }
}
/// One or more flags which control the behavior and features of the VLAN
/// interface. Flags include [`VlanFlags::REORDER_HEADERS`][crate::VlanFlags::REORDER_HEADERS] (reordering of
/// output packet headers), [`VlanFlags::GVRP`][crate::VlanFlags::GVRP] (use of the GVRP protocol),
/// and [`VlanFlags::LOOSE_BINDING`][crate::VlanFlags::LOOSE_BINDING] (loose binding of the interface to its
/// controller device's operating state). [`VlanFlags::MVRP`][crate::VlanFlags::MVRP] (use of the MVRP
/// protocol).
///
/// The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS,
/// but it used to be 0. To preserve backward compatibility, the default-value
/// in the D-Bus API continues to be 0 and a missing property on D-Bus
/// is still considered as 0.
pub fn flags(self, flags: VlanFlags) -> Self {
Self { builder: self.builder.property("flags", flags), }
}
/// The VLAN identifier that the interface created by this connection should
/// be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
pub fn id(self, id: u32) -> Self {
Self { builder: self.builder.property("id", id), }
}
/// For incoming packets, a list of mappings from 802.1p priorities to Linux
/// SKB priorities. The mapping is given in the format "from:to" where both
/// "from" and "to" are unsigned integers, ie "7:3".
pub fn ingress_priority_map(self, ingress_priority_map: impl Into<glib::StrV>) -> Self {
Self { builder: self.builder.property("ingress-priority-map", ingress_priority_map.into()), }
}
/// If given, specifies the parent interface name or parent connection UUID
/// from which this VLAN interface should be created. If this property is
/// not specified, the connection must contain an #NMSettingWired setting
/// with a #NMSettingWired:mac-address property.
pub fn parent(self, parent: impl Into<glib::GString>) -> Self {
Self { builder: self.builder.property("parent", parent.into()), }
}
/// Specifies the VLAN protocol to use for encapsulation.
///
/// Supported values are: '802.1Q', '802.1ad'. If not specified the default
/// value is '802.1Q'.
#[cfg(feature = "v1_42")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_42")))]
pub fn protocol(self, protocol: impl Into<glib::GString>) -> Self {
Self { builder: self.builder.property("protocol", protocol.into()), }
}
// rustdoc-stripper-ignore-next
/// Build the [`SettingVlan`].
#[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
pub fn build(self) -> SettingVlan {
assert_initialized_main_thread!();
self.builder.build() }
}