SettingWireless

Struct SettingWireless 

Source
pub struct SettingWireless { /* private fields */ }
Expand description

Wi-Fi Settings

§Properties

§ap-isolation

Configures AP isolation, which prevents communication between wireless devices connected to this AP. This property can be set to a value different from Ternary::Default only when the interface is configured in AP mode.

If set to Ternary::True, devices are not able to communicate with each other. This increases security because it protects devices against attacks from other clients in the network. At the same time, it prevents devices to access resources on the same wireless networks as file shares, printers, etc.

If set to Ternary::False, devices can talk to each other.

When set to Ternary::Default, the global default is used; in case the global default is unspecified it is assumed to be Ternary::False.

Readable | Writeable

§band

802.11 frequency band of the network. One of “a” for 5GHz 802.11a or “bg” for 2.4GHz 802.11. This will lock associations to the Wi-Fi network to the specific band, i.e. if “a” is specified, the device will not associate with the same network in the 2.4GHz band even if the network’s settings are compatible. This setting depends on specific driver capability and may not work with all drivers.

Readable | Writeable

§bssid

If specified, directs the device to only associate with the given access point. This capability is highly driver dependent and not supported by all devices. Note: this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future.

Locking a client profile to a certain BSSID will prevent roaming and also disable background scanning. That can be useful, if there is only one access point for the SSID.

Readable | Writeable

§channel

Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the “band” property to be set.

Readable | Writeable

§channel-width

Specifies width of the wireless channel in Access Point (AP) mode.

When set to [SettingWirelessChannelWidth::Auto][crate::SettingWirelessChannelWidth::Auto] (the default), the channel width is automatically determined. At the moment, this means that the safest (smallest) width is chosen.

If the value is not [SettingWirelessChannelWidth::Auto][crate::SettingWirelessChannelWidth::Auto], then the ‘channel’ property must also be set. When using the 2.4GHz band, the width can be at most 40MHz.

This property can be set to a value different from [SettingWirelessChannelWidth::Auto][crate::SettingWirelessChannelWidth::Auto] only when the interface is configured in AP mode.

Readable | Writeable

§cloned-mac-address

If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing.

Beside explicitly specifying a MAC address, the special values “preserve”, “permanent”, “random”, “stable” and “stable-ssid” are supported. “preserve” means not to touch the MAC address on activation. “permanent” means to use the permanent hardware address of the device. “random” creates a random MAC address on each connect. “stable” creates a hashed MAC address based on connection.stable-id and a machine dependent key. “stable-ssid” creates a hashed MAC address based on the SSID, the same as setting the stable-id to “${NETWORK_SSID}”.

If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to “preserve” (older versions of NetworkManager may use a different default value).

On D-Bus, this field is expressed as “assigned-mac-address” or the deprecated “cloned-mac-address”.

Readable | Writeable

§generate-mac-address-mask

With #NMSettingWireless:cloned-mac-address setting “random” or “stable”, by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows one to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address.

If the property is None, it is eligible to be overwritten by a default connection setting. If the value is still None or an empty string, the default is to create a locally-administered, unicast MAC address.

If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting “FE:FF:FF:00:00:00” means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the “random” or “stable” algorithm.

If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of “FE:FF:FF:00:00:00 68:F7:28:00:00:00” will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of “02:00:00:00:00:00 00:00:00:00:00:00” will create a fully scrambled globally-administered, burned-in MAC address.

If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, “02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00” will create a fully scrambled MAC address, randomly locally or globally administered.

Readable | Writeable

§hidden

If true, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode.

In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution.

In AP mode, the created network does not broadcast its SSID.

Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air.

Readable | Writeable

§mac-address

If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).

Readable | Writeable

§mac-address-blacklist

A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg “00:11:22:33:44:55”).

Readable | Writeable

§mac-address-denylist

A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg “00:11:22:33:44:55”).

Readable | Writeable

§mac-address-randomization

One of SettingMacRandomization::Default (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), SettingMacRandomization::Never (never randomize the MAC address), or SettingMacRandomization::Always (always randomize the MAC address).

Readable | Writeable

§mode

Wi-Fi network mode; one of “infrastructure”, “mesh”, “adhoc” or “ap”. If blank, infrastructure is assumed.

Readable | Writeable

§mtu

If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.

Readable | Writeable

§powersave

One of SettingWirelessPowersave::Disable (disable Wi-Fi power saving), SettingWirelessPowersave::Enable (enable Wi-Fi power saving), SettingWirelessPowersave::Ignore (don’t touch currently configure setting) or SettingWirelessPowersave::Default (use the globally configured value). All other values are reserved.

Readable | Writeable

§rate

This property is not implemented and has no effect.

Readable | Writeable

§seen-bssids

A list of BSSIDs (each BSSID formatted as a MAC address like “00:11:22:33:44:55”) that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved.

This is not a regular property that the user would configure. Instead, NetworkManager automatically sets the seen BSSIDs and tracks them internally in “/var/lib/NetworkManager/seen-bssids” file.

Readable | Writeable

§ssid

SSID of the Wi-Fi network. Must be specified.

Readable | Writeable

§tx-power

This property is not implemented and has no effect.

Readable | Writeable

§wake-on-wlan

The #NMSettingWirelessWakeOnWLan options to enable. Not all devices support all options. May be any combination of SettingWirelessWakeOnWLan::ANY, SettingWirelessWakeOnWLan::DISCONNECT, SettingWirelessWakeOnWLan::MAGIC, SettingWirelessWakeOnWLan::GTK_REKEY_FAILURE, SettingWirelessWakeOnWLan::EAP_IDENTITY_REQUEST, SettingWirelessWakeOnWLan::_4WAY_HANDSHAKE, SettingWirelessWakeOnWLan::RFKILL_RELEASE, SettingWirelessWakeOnWLan::TCP or the special values SettingWirelessWakeOnWLan::DEFAULT (to use global settings) and SettingWirelessWakeOnWLan::IGNORE (to disable management of Wake-on-LAN in NetworkManager).

Readable | Writeable

Setting

§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

§Implements

SettingExt

GLib type: GObject with reference counted clone semantics.

Implementations§

Source§

impl SettingWireless

Source

pub fn new() -> SettingWireless

Creates a new #NMSettingWireless object with default values.

§Returns

the new empty #NMSettingWireless object

Source

pub fn builder() -> SettingWirelessBuilder

Creates a new builder-pattern struct instance to construct SettingWireless objects.

This method returns an instance of SettingWirelessBuilder which can be used to create SettingWireless objects.

Source

pub fn add_mac_blacklist_item(&self, mac: &str) -> bool

Adds a new MAC address to the #NMSettingWireless:mac-address-denylist property.

§Deprecated since 1.48

Use nm_setting_wireless_add_mac_denylist_item() instead.

§mac

the MAC address string (hex-digits-and-colons notation) to denylist

§Returns

true if the MAC address was added; false if the MAC address is invalid or was already present

Source

pub fn add_seen_bssid(&self, bssid: &str) -> bool

Adds a new Wi-Fi AP’s BSSID to the previously seen BSSID list of the setting. NetworkManager now tracks previously seen BSSIDs internally so this function no longer has much use. Actually, changes you make using this function will not be preserved.

§bssid

the new BSSID to add to the list

§Returns

true if @bssid was already known, false if not

Source

pub fn ap_security_compatible( &self, s_wireless_sec: &SettingWirelessSecurity, ap_flags: NM80211ApFlags, ap_wpa: NM80211ApSecurityFlags, ap_rsn: NM80211ApSecurityFlags, ap_mode: NM80211Mode, ) -> bool

Given a #NMSettingWireless and an optional #NMSettingWirelessSecurity, determine if the configuration given by the settings is compatible with the security of an access point using that access point’s capability flags and mode. Useful for clients that wish to filter a set of connections against a set of access points and determine which connections are compatible with which access points.

§s_wireless_sec

a #NMSettingWirelessSecurity or None

§ap_flags

the NM80211ApFlags of the given access point

§ap_wpa

the NM80211ApSecurityFlags of the given access point’s WPA capabilities

§ap_rsn

the NM80211ApSecurityFlags of the given access point’s WPA2/RSN capabilities

§ap_mode

the 802.11 mode of the AP, either Ad-Hoc or Infrastructure

§Returns

true if the given settings are compatible with the access point’s security flags and mode, false if they are not.

Source

pub fn clear_mac_blacklist_items(&self)

Removes all denylisted MAC addresses.

§Deprecated since 1.48

Use nm_setting_wireless_clear_mac_denylist_items() instead.

Source

pub fn band(&self) -> GString

§Returns

the #NMSettingWireless:band property of the setting

Source

pub fn bssid(&self) -> GString

§Returns

the #NMSettingWireless:bssid property of the setting

Source

pub fn channel(&self) -> u32

§Returns

the #NMSettingWireless:channel property of the setting

Source

pub fn cloned_mac_address(&self) -> GString

§Returns

the #NMSettingWireless:cloned-mac-address property of the setting

Source

pub fn generate_mac_address_mask(&self) -> GString

Available on crate feature v1_4 only.
§Returns

the #NMSettingWireless:generate-mac-address-mask property of the setting

Source

pub fn is_hidden(&self) -> bool

§Returns

the #NMSettingWireless:hidden property of the setting

Source

pub fn mac_address(&self) -> GString

§Returns

the #NMSettingWireless:mac-address property of the setting

Source

pub fn mac_address_blacklist(&self) -> Vec<GString>

§Deprecated since 1.48

Use nm_setting_wireless_get_mac_address_denylist() instead.

§Returns

the #NMSettingWireless:mac-address-blacklist property of the setting

Source

pub fn mac_address_randomization(&self) -> SettingMacRandomization

Available on crate feature v1_2 only.
§Returns

the #NMSettingWireless:mac-address-randomization property of the setting

Source

pub fn mac_blacklist_item(&self, idx: u32) -> GString

Since 1.46, access at index “len” is allowed and returns NULL.

§Deprecated since 1.48

Use nm_setting_wireless_get_mac_denylist_item() instead.

§idx

the zero-based index of the MAC address entry

§Returns

the denylisted MAC address string (hex-digits-and-colons notation) at index @idx

Source

pub fn mode(&self) -> GString

§Returns

the #NMSettingWireless:mode property of the setting

Source

pub fn mtu(&self) -> u32

§Returns

the #NMSettingWireless:mtu property of the setting

Source

pub fn num_mac_blacklist_items(&self) -> u32

§Deprecated since 1.48

Use nm_setting_wireless_get_num_mac_denylist_items() instead.

§Returns

the number of blacklist MAC addresses

Source

pub fn num_seen_bssids(&self) -> u32

§Returns

the number of BSSIDs in the previously seen BSSID list

Source

pub fn powersave(&self) -> u32

Available on crate feature v1_2 only.
§Returns

the #NMSettingWireless:powersave property of the setting

Source

pub fn rate(&self) -> u32

§Deprecated since 1.44

This setting is not implemented and has no effect.

§Returns

the #NMSettingWireless:rate property of the setting

Source

pub fn seen_bssid(&self, i: u32) -> GString

§i

index of a BSSID in the previously seen BSSID list

§Returns

the BSSID at index @i

Source

pub fn tx_power(&self) -> u32

§Deprecated since 1.44

This setting is not implemented and has no effect.

§Returns

the #NMSettingWireless:tx-power property of the setting

Source

pub fn wake_on_wlan(&self) -> SettingWirelessWakeOnWLan

Available on crate feature v1_12 only.

Returns the Wake-on-WLAN options enabled for the connection

§Returns

the Wake-on-WLAN options

Source

pub fn remove_mac_blacklist_item(&self, idx: u32)

Removes the MAC address at index @idx from the denylist.

§Deprecated since 1.48

Use nm_setting_wireless_remove_mac_denylist_item() instead.

§idx

index number of the MAC address

Source

pub fn remove_mac_blacklist_item_by_value(&self, mac: &str) -> bool

Removes the MAC address @mac from the denylist.

§Deprecated since 1.48

Use nm_setting_wireless_remove_mac_denylist_item_by_value() instead.

§mac

the MAC address string (hex-digits-and-colons notation) to remove from the denylist

§Returns

true if the MAC address was found and removed; false if it was not.

Source

pub fn set_band(&self, band: Option<&str>)

802.11 frequency band of the network. One of “a” for 5GHz 802.11a or “bg” for 2.4GHz 802.11. This will lock associations to the Wi-Fi network to the specific band, i.e. if “a” is specified, the device will not associate with the same network in the 2.4GHz band even if the network’s settings are compatible. This setting depends on specific driver capability and may not work with all drivers.

Source

pub fn set_bssid(&self, bssid: Option<&str>)

If specified, directs the device to only associate with the given access point. This capability is highly driver dependent and not supported by all devices. Note: this property does not control the BSSID used when creating an Ad-Hoc network and is unlikely to in the future.

Locking a client profile to a certain BSSID will prevent roaming and also disable background scanning. That can be useful, if there is only one access point for the SSID.

Source

pub fn set_channel(&self, channel: u32)

Wireless channel to use for the Wi-Fi connection. The device will only join (or create for Ad-Hoc networks) a Wi-Fi network on the specified channel. Because channel numbers overlap between bands, this property also requires the “band” property to be set.

Source

pub fn set_cloned_mac_address(&self, cloned_mac_address: Option<&str>)

If specified, request that the device use this MAC address instead. This is known as MAC cloning or spoofing.

Beside explicitly specifying a MAC address, the special values “preserve”, “permanent”, “random”, “stable” and “stable-ssid” are supported. “preserve” means not to touch the MAC address on activation. “permanent” means to use the permanent hardware address of the device. “random” creates a random MAC address on each connect. “stable” creates a hashed MAC address based on connection.stable-id and a machine dependent key. “stable-ssid” creates a hashed MAC address based on the SSID, the same as setting the stable-id to “${NETWORK_SSID}”.

If unspecified, the value can be overwritten via global defaults, see manual of NetworkManager.conf. If still unspecified, it defaults to “preserve” (older versions of NetworkManager may use a different default value).

On D-Bus, this field is expressed as “assigned-mac-address” or the deprecated “cloned-mac-address”.

Source

pub fn set_generate_mac_address_mask( &self, generate_mac_address_mask: Option<&str>, )

With #NMSettingWireless:cloned-mac-address setting “random” or “stable”, by default all bits of the MAC address are scrambled and a locally-administered, unicast MAC address is created. This property allows one to specify that certain bits are fixed. Note that the least significant bit of the first MAC address will always be unset to create a unicast MAC address.

If the property is None, it is eligible to be overwritten by a default connection setting. If the value is still None or an empty string, the default is to create a locally-administered, unicast MAC address.

If the value contains one MAC address, this address is used as mask. The set bits of the mask are to be filled with the current MAC address of the device, while the unset bits are subject to randomization. Setting “FE:FF:FF:00:00:00” means to preserve the OUI of the current MAC address and only randomize the lower 3 bytes using the “random” or “stable” algorithm.

If the value contains one additional MAC address after the mask, this address is used instead of the current MAC address to fill the bits that shall not be randomized. For example, a value of “FE:FF:FF:00:00:00 68:F7:28:00:00:00” will set the OUI of the MAC address to 68:F7:28, while the lower bits are randomized. A value of “02:00:00:00:00:00 00:00:00:00:00:00” will create a fully scrambled globally-administered, burned-in MAC address.

If the value contains more than one additional MAC addresses, one of them is chosen randomly. For example, “02:00:00:00:00:00 00:00:00:00:00:00 02:00:00:00:00:00” will create a fully scrambled MAC address, randomly locally or globally administered.

Source

pub fn set_hidden(&self, hidden: bool)

If true, indicates that the network is a non-broadcasting network that hides its SSID. This works both in infrastructure and AP mode.

In infrastructure mode, various workarounds are used for a more reliable discovery of hidden networks, such as probe-scanning the SSID. However, these workarounds expose inherent insecurities with hidden SSID networks, and thus hidden SSID networks should be used with caution.

In AP mode, the created network does not broadcast its SSID.

Note that marking the network as hidden may be a privacy issue for you (in infrastructure mode) or client stations (in AP mode), as the explicit probe-scans are distinctly recognizable on the air.

Source

pub fn set_mac_address(&self, mac_address: Option<&str>)

If specified, this connection will only apply to the Wi-Fi device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).

Source

pub fn set_mac_address_blacklist(&self, mac_address_blacklist: &[&str])

A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg “00:11:22:33:44:55”).

Source

pub fn mac_address_denylist(&self) -> Vec<GString>

Available on non-crate feature v1_48 only.
Source

pub fn set_mac_address_denylist(&self, mac_address_denylist: &[&str])

A list of permanent MAC addresses of Wi-Fi devices to which this connection should never apply. Each MAC address should be given in the standard hex-digits-and-colons notation (eg “00:11:22:33:44:55”).

Source

pub fn set_mac_address_randomization(&self, mac_address_randomization: u32)

👎Deprecated: Since 1.4
Available on crate feature v1_2 only.

One of SettingMacRandomization::Default (never randomize unless the user has set a global default to randomize and the supplicant supports randomization), SettingMacRandomization::Never (never randomize the MAC address), or SettingMacRandomization::Always (always randomize the MAC address).

§Deprecated since 1.4

Use the #NMSettingWireless:cloned-mac-address property instead.

Source

pub fn set_mode(&self, mode: Option<&str>)

Wi-Fi network mode; one of “infrastructure”, “mesh”, “adhoc” or “ap”. If blank, infrastructure is assumed.

Source

pub fn set_mtu(&self, mtu: u32)

If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple Ethernet frames.

Source

pub fn set_powersave(&self, powersave: u32)

Available on crate feature v1_2 only.

One of SettingWirelessPowersave::Disable (disable Wi-Fi power saving), SettingWirelessPowersave::Enable (enable Wi-Fi power saving), SettingWirelessPowersave::Ignore (don’t touch currently configure setting) or SettingWirelessPowersave::Default (use the globally configured value). All other values are reserved.

Source

pub fn set_rate(&self, rate: u32)

This property is not implemented and has no effect.

§Deprecated since 1.44

This property is not implemented and has no effect.

Source

pub fn seen_bssids(&self) -> Vec<GString>

A list of BSSIDs (each BSSID formatted as a MAC address like “00:11:22:33:44:55”) that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved.

This is not a regular property that the user would configure. Instead, NetworkManager automatically sets the seen BSSIDs and tracks them internally in “/var/lib/NetworkManager/seen-bssids” file.

Source

pub fn set_seen_bssids(&self, seen_bssids: &[&str])

A list of BSSIDs (each BSSID formatted as a MAC address like “00:11:22:33:44:55”) that have been detected as part of the Wi-Fi network. NetworkManager internally tracks previously seen BSSIDs. The property is only meant for reading and reflects the BSSID list of NetworkManager. The changes you make to this property will not be preserved.

This is not a regular property that the user would configure. Instead, NetworkManager automatically sets the seen BSSIDs and tracks them internally in “/var/lib/NetworkManager/seen-bssids” file.

Source

pub fn set_tx_power(&self, tx_power: u32)

This property is not implemented and has no effect.

§Deprecated since 1.44

This property is not implemented and has no effect.

Source

pub fn set_wake_on_wlan(&self, wake_on_wlan: u32)

Available on crate feature v1_12 only.
Source

pub fn connect_band_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_bssid_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_channel_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_cloned_mac_address_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_generate_mac_address_mask_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_hidden_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_mac_address_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_mac_address_blacklist_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_mac_address_denylist_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_mac_address_randomization_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

👎Deprecated: Since 1.4
Available on crate feature v1_2 only.
Source

pub fn connect_mode_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_mtu_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_powersave_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Available on crate feature v1_2 only.
Source

pub fn connect_rate_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_seen_bssids_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_ssid_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_tx_power_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

pub fn connect_wake_on_wlan_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Available on crate feature v1_12 only.

Trait Implementations§

Source§

impl Clone for SettingWireless

Source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the object. Dropping the object will decrement it again.

1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SettingWireless

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SettingWireless

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl HasParamSpec for SettingWireless

Source§

type ParamSpec = ParamSpecObject

Source§

type SetValue = SettingWireless

Preferred value to be used as setter for the associated ParamSpec.
Source§

type BuilderFn = fn(&str) -> ParamSpecObjectBuilder<'_, SettingWireless>

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for SettingWireless

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Hashes the memory address of this object.

1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for SettingWireless

Source§

fn cmp(&self, other: &Self) -> Ordering

Comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl ParentClassIs for SettingWireless

Source§

impl<OT: ObjectType> PartialEq<OT> for SettingWireless

Source§

fn eq(&self, other: &OT) -> bool

Equality for two GObjects.

Two GObjects are equal if their memory addresses are equal.

1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<OT: ObjectType> PartialOrd<OT> for SettingWireless

Source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

Partial comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StaticType for SettingWireless

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl Eq for SettingWireless

Source§

impl IsA<Setting> for SettingWireless

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Cast for T
where T: ObjectType,

Source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
Source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
Source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
Source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
Source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
Source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
Source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

Source§

impl<U> IsSubclassableExt for U

Source§

impl<T> ObjectExt for T
where T: ObjectType,

Source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
Source§

fn type_(&self) -> Type

Returns the type of the object.
Source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
Source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
Source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
Source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
Source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
Source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
Source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
Source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
Source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
Source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
Source§

fn has_property(&self, property_name: &str) -> bool

Check if the object has a property property_name.
Source§

fn has_property_with_type(&self, property_name: &str, type_: Type) -> bool

Check if the object has a property property_name of the given type_.
Source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
Source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
Source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
Source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
Source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
Source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
Source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
Source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
Source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
Source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
Source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
Source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
Source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
Source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
Source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
Source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
Source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
Source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
Source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
Source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
Source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
Source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
Source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
Source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>

Emit signal by its name. Read more
Source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by its name with details. Read more
Source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by its name with details. Read more
Source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by signal id with details. Read more
Source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by signal id with details. Read more
Source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
Source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
Source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
Source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
Source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
Source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
Source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
Source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
Source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
Source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str, ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
Source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
Source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
Source§

impl<T> Property for T
where T: HasParamSpec,

Source§

type Value = T

Source§

impl<T> PropertyGet for T
where T: HasParamSpec,

Source§

type Value = T

Source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

Source§

impl<O> SettingExt for O
where O: IsA<Setting>,

Source§

fn compare(&self, b: &impl IsA<Setting>, flags: SettingCompareFlags) -> bool

Source§

fn duplicate(&self) -> Setting

Duplicates a #NMSetting. Read more
Source§

fn name(&self) -> GString

Returns the type name of the #NMSetting object Read more
Source§

fn secret_flags( &self, secret_name: &str, out_flags: SettingSecretFlags, ) -> Result<(), Error>

For a given secret, retrieves the #NMSettingSecretFlags describing how to handle that secret. Read more
Source§

fn set_secret_flags( &self, secret_name: &str, flags: SettingSecretFlags, ) -> Result<(), Error>

For a given secret, stores the #NMSettingSecretFlags describing how to handle that secret. Read more
Source§

fn to_str(&self) -> GString

Convert the setting (including secrets!) into a string. For debugging purposes ONLY, should NOT be used for serialization of the setting, or machine-parsed in any way. The output format is not guaranteed to be stable and may change at any time. Read more
Source§

fn verify(&self, connection: Option<&impl IsA<Connection>>) -> Result<(), Error>

Validates the setting. Each setting’s properties have allowed values, and some are dependent on other values (hence the need for @connection). The returned #GError contains information about which property of the setting failed validation, and in what way that property failed validation. Read more
Source§

fn verify_secrets( &self, connection: Option<&impl IsA<Connection>>, ) -> Result<(), Error>

Available on crate feature v1_2 only.
Verifies the secrets in the setting. The returned #GError contains information about which secret of the setting failed validation, and in what way that secret failed validation. The secret validation is done separately from main setting validation, because in some cases connection failure is not desired just for the secrets. Read more
Source§

fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

impl<T> SettingWirelessExtManual for T
where T: IsA<SettingWireless, GlibType = NMSettingWireless>,

Source§

fn ssid(&self) -> Bytes

Returns Read more
Source§

fn ssid_utf8(&self) -> Option<GString>

Returns Read more
Source§

fn set_ssid<B: Borrow<[u8]> + ?Sized>(&self, ssid: &B)

Source§

impl<T> StaticTypeExt for T
where T: StaticType,

Source§

fn ensure_type()

Ensures that the type has been registered with the type system.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TransparentType for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

Source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,