SettingWired

Struct SettingWired 

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

Wired Ethernet Settings

§Properties

§accept-all-mac-addresses

When true, setup the interface to accept packets for all MAC addresses. This is enabling the kernel interface flag IFF_PROMISC. When false, the interface will only accept the packets with the interface destination mac address or broadcast.

Readable | Writeable

§auto-negotiate

When true, enforce auto-negotiation of speed and duplex mode. If “speed” and “duplex” properties are both specified, only that single mode will be advertised and accepted during the link auto-negotiation process: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. When false, “speed” and “duplex” properties should be both set or link configuration will be skipped.

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” and “stable” are supported. “preserve” means not to touch the MAC address on activation. “permanent” means to use the permanent hardware address if the device has one (otherwise this is treated as “preserve”). “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.

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

§duplex

When a value is set, either “half” or “full”, configures the device to use the specified duplex mode. If “auto-negotiate” is “yes” the specified duplex mode will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. If the value is unset (the default), the link configuration will be either skipped (if “auto-negotiate” is “no”, the default) or will be auto-negotiated (if “auto-negotiate” is “yes”) and the local device will advertise all the supported duplex modes. Must be set together with the “speed” property if specified. Before specifying a duplex mode be sure your device supports it.

Readable | Writeable

§generate-mac-address-mask

With #NMSettingWired: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

§mac-address

If specified, this connection will only apply to the Ethernet 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

If specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).

Readable | Writeable

§mac-address-denylist

If specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).

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

§port

Specific port type to use if the device supports multiple attachment methods. One of “tp” (Twisted Pair), “aui” (Attachment Unit Interface), “bnc” (Thin Ethernet) or “mii” (Media Independent Interface). If the device supports only one port type, this setting is ignored.

Readable | Writeable

§s390-nettype

s390 network device type; one of “qeth”, “lcs”, or “ctc”, representing the different types of virtual network devices available on s390 systems.

Readable | Writeable

§s390-options

Dictionary of key/value pairs of s390-specific device options. Both keys and values must be strings. Allowed keys include “portno”, “layer2”, “portname”, “protocol”, among others. Key names must contain only alphanumeric characters (ie, [a-zA-Z0-9]).

Currently, NetworkManager itself does nothing with this information. However, s390utils ships a udev rule which parses this information and applies it to the interface.

Readable | Writeable

§s390-subchannels

Identifies specific subchannels that this network device uses for communication with z/VM or s390 host. Like the #NMSettingWired:mac-address property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character.

Readable | Writeable

§speed

When a value greater than 0 is set, configures the device to use the specified speed. If “auto-negotiate” is “yes” the specified speed will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabit speeds, as in this case link negotiation is mandatory. If the value is unset (0, the default), the link configuration will be either skipped (if “auto-negotiate” is “no”, the default) or will be auto-negotiated (if “auto-negotiate” is “yes”) and the local device will advertise all the supported speeds. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the “duplex” property when non-zero. Before specifying a speed value be sure your device supports it.

Readable | Writeable

§wake-on-lan

The #NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of SettingWiredWakeOnLan::PHY, SettingWiredWakeOnLan::UNICAST, SettingWiredWakeOnLan::MULTICAST, SettingWiredWakeOnLan::BROADCAST, SettingWiredWakeOnLan::ARP, SettingWiredWakeOnLan::MAGIC or the special values SettingWiredWakeOnLan::DEFAULT (to use global settings) and SettingWiredWakeOnLan::IGNORE (to disable management of Wake-on-LAN in NetworkManager).

Readable | Writeable

§wake-on-lan-password

If specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If None, no password will be required.

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 SettingWired

Source

pub fn new() -> SettingWired

Creates a new #NMSettingWired object with default values.

§Returns

the new empty #NMSettingWired object

Source

pub fn builder() -> SettingWiredBuilder

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

This method returns an instance of SettingWiredBuilder which can be used to create SettingWired objects.

Source

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

Adds a new MAC address to the #NMSettingWired:mac-address-blacklist property.

§Deprecated since 1.48

Use nm_setting_wired_add_mac_denylist_item() instead.

§mac

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

§Returns

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

Source

pub fn add_s390_option(&self, key: &str, value: &str) -> bool

Add an option to the table. If the key already exists, the value gets replaced.

Before 1.32, the function would assert that the key is valid. Since then, an invalid key gets silently added but renders the profile as invalid.

§key

key name for the option

§value

value for the option

§Returns

since 1.32 this always returns true.

Source

pub fn clear_mac_blacklist_items(&self)

Removes all blacklisted MAC addresses.

§Deprecated since 1.48

Use nm_setting_wired_clear_mac_denylist_items() instead.

Source

pub fn is_auto_negotiate(&self) -> bool

§Returns

the #NMSettingWired:auto-negotiate property of the setting

Source

pub fn cloned_mac_address(&self) -> GString

§Returns

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

Source

pub fn duplex(&self) -> GString

§Returns

the #NMSettingWired:duplex property of the setting

Source

pub fn generate_mac_address_mask(&self) -> GString

Available on crate feature v1_4 only.
§Returns

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

Source

pub fn mac_address(&self) -> GString

§Returns

the #NMSettingWired:mac-address property of the setting

Source

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

§Deprecated since 1.48

Use nm_setting_wired_get_mac_address_denylist() instead.

§Returns

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

Source

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

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

§Deprecated since 1.48

Use nm_setting_wired_get_mac_denylist_item() instead.

§idx

the zero-based index of the MAC address entry

§Returns

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

Source

pub fn mtu(&self) -> u32

§Returns

the #NMSettingWired:mtu property of the setting

Source

pub fn num_mac_blacklist_items(&self) -> u32

§Deprecated since 1.48

Use nm_setting_wired_get_num_mac_denylist_items() instead.

§Returns

the number of blacklisted MAC addresses

Source

pub fn num_s390_options(&self) -> u32

Returns the number of s390-specific options that should be set for this device when it is activated. This can be used to retrieve each s390 option individually using nm_setting_wired_get_s390_option().

§Returns

the number of s390-specific device options

Source

pub fn port(&self) -> GString

§Returns

the #NMSettingWired:port property of the setting

Source

pub fn s390_nettype(&self) -> GString

Returns the s390 device type this connection should apply to. Will be one of ‘qeth’, ‘lcs’, or ‘ctc’.

§Returns

the s390 device type

Source

pub fn s390_option( &self, idx: u32, ) -> Option<(Option<GString>, Option<GString>)>

Given an index, return the value of the s390 option at that index. indexes are not guaranteed to be static across modifications to options done by nm_setting_wired_add_s390_option() and nm_setting_wired_remove_s390_option(), and should not be used to refer to options except for short periods of time such as during option iteration.

§idx

index of the desired option, from 0 to nm_setting_wired_get_num_s390_options() - 1

§Returns

true on success if the index was valid and an option was found, false if the index was invalid (ie, greater than the number of options currently held by the setting)

§out_key

on return, the key name of the s390 specific option; this value is owned by the setting and should not be modified

§out_value

on return, the value of the key of the s390 specific option; this value is owned by the setting and should not be modified

Source

pub fn s390_option_by_key(&self, key: &str) -> GString

Returns the value associated with the s390-specific option specified by @key, if it exists.

§key

the key for which to retrieve the value

§Returns

the value, or None if the key/value pair was never added to the setting; the value is owned by the setting and must not be modified

Source

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

Return the list of s390 subchannels that identify the device that this connection is applicable to. The connection should only be used in conjunction with that device.

§Returns

array of strings, each specifying one subchannel the s390 device uses to communicate to the host.

Source

pub fn speed(&self) -> u32

§Returns

the #NMSettingWired:speed property of the setting

Source

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

Returns a list of valid s390 options.

The @self argument is unused and None may be passed instead.

§Returns

a None-terminated array of strings of valid s390 options.

Source

pub fn wake_on_lan(&self) -> SettingWiredWakeOnLan

Available on crate feature v1_2 only.

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

§Returns

the Wake-on-LAN options

Source

pub fn wake_on_lan_password(&self) -> GString

Available on crate feature v1_2 only.

Returns the Wake-on-LAN password. This only applies to SettingWiredWakeOnLan::MAGIC.

§Returns

the Wake-on-LAN setting password, or None if there is no password.

Source

pub fn remove_mac_blacklist_item(&self, idx: u32)

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

§Deprecated since 1.48

Use nm_setting_wired_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 blacklist.

§Deprecated since 1.48

Use nm_setting_wired_remove_mac_denylist_item_by_value() instead.

§mac

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

§Returns

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

Source

pub fn remove_s390_option(&self, key: &str) -> bool

Remove the s390-specific option referenced by @key from the internal option list.

§key

key name for the option to remove

§Returns

true if the option was found and removed from the internal option list, false if it was not.

Source

pub fn set_auto_negotiate(&self, auto_negotiate: bool)

When true, enforce auto-negotiation of speed and duplex mode. If “speed” and “duplex” properties are both specified, only that single mode will be advertised and accepted during the link auto-negotiation process: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. When false, “speed” and “duplex” properties should be both set or link configuration will be skipped.

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” and “stable” are supported. “preserve” means not to touch the MAC address on activation. “permanent” means to use the permanent hardware address if the device has one (otherwise this is treated as “preserve”). “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.

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_duplex(&self, duplex: Option<&str>)

When a value is set, either “half” or “full”, configures the device to use the specified duplex mode. If “auto-negotiate” is “yes” the specified duplex mode will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabits modes, as in these cases link negotiation is mandatory. If the value is unset (the default), the link configuration will be either skipped (if “auto-negotiate” is “no”, the default) or will be auto-negotiated (if “auto-negotiate” is “yes”) and the local device will advertise all the supported duplex modes. Must be set together with the “speed” property if specified. Before specifying a duplex mode be sure your device supports it.

Source

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

With #NMSettingWired: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_mac_address(&self, mac_address: Option<&str>)

If specified, this connection will only apply to the Ethernet 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])

If specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (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])

If specified, this connection will never apply to the Ethernet device whose permanent MAC address matches an address in the list. Each MAC address is in the standard hex-digits-and-colons notation (00:11:22:33:44:55).

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_port(&self, port: Option<&str>)

Specific port type to use if the device supports multiple attachment methods. One of “tp” (Twisted Pair), “aui” (Attachment Unit Interface), “bnc” (Thin Ethernet) or “mii” (Media Independent Interface). If the device supports only one port type, this setting is ignored.

Source

pub fn set_s390_nettype(&self, s390_nettype: Option<&str>)

s390 network device type; one of “qeth”, “lcs”, or “ctc”, representing the different types of virtual network devices available on s390 systems.

Source

pub fn set_s390_subchannels(&self, s390_subchannels: &[&str])

Identifies specific subchannels that this network device uses for communication with z/VM or s390 host. Like the #NMSettingWired:mac-address property for non-z/VM devices, this property can be used to ensure this connection only applies to the network device that uses these subchannels. The list should contain exactly 3 strings, and each string may only be composed of hexadecimal characters and the period (.) character.

Source

pub fn set_speed(&self, speed: u32)

When a value greater than 0 is set, configures the device to use the specified speed. If “auto-negotiate” is “yes” the specified speed will be the only one advertised during link negotiation: this works only for BASE-T 802.3 specifications and is useful for enforcing gigabit speeds, as in this case link negotiation is mandatory. If the value is unset (0, the default), the link configuration will be either skipped (if “auto-negotiate” is “no”, the default) or will be auto-negotiated (if “auto-negotiate” is “yes”) and the local device will advertise all the supported speeds. In Mbit/s, ie 100 == 100Mbit/s. Must be set together with the “duplex” property when non-zero. Before specifying a speed value be sure your device supports it.

Source

pub fn set_wake_on_lan(&self, wake_on_lan: u32)

Available on crate feature v1_2 only.

The #NMSettingWiredWakeOnLan options to enable. Not all devices support all options. May be any combination of SettingWiredWakeOnLan::PHY, SettingWiredWakeOnLan::UNICAST, SettingWiredWakeOnLan::MULTICAST, SettingWiredWakeOnLan::BROADCAST, SettingWiredWakeOnLan::ARP, SettingWiredWakeOnLan::MAGIC or the special values SettingWiredWakeOnLan::DEFAULT (to use global settings) and SettingWiredWakeOnLan::IGNORE (to disable management of Wake-on-LAN in NetworkManager).

Source

pub fn set_wake_on_lan_password(&self, wake_on_lan_password: Option<&str>)

Available on crate feature v1_2 only.

If specified, the password used with magic-packet-based Wake-on-LAN, represented as an Ethernet MAC address. If None, no password will be required.

Source

pub fn connect_auto_negotiate_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_duplex_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_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_mtu_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Available on crate feature v1_2 only.
Source

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

Available on crate feature v1_2 only.

Trait Implementations§

Source§

impl Clone for SettingWired

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 SettingWired

Source§

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

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

impl Default for SettingWired

Source§

fn default() -> Self

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

impl HasParamSpec for SettingWired

Source§

type ParamSpec = ParamSpecObject

Source§

type SetValue = SettingWired

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

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

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for SettingWired

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 SettingWired

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 SettingWired

Source§

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

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 SettingWired

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 SettingWired

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl Eq for SettingWired

Source§

impl IsA<Setting> for SettingWired

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> 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>,