ActiveConnectionExt

Trait ActiveConnectionExt 

Source
pub trait ActiveConnectionExt: IsA<ActiveConnection> + 'static {
Show 34 methods // Provided methods fn connection(&self) -> RemoteConnection { ... } fn connection_type(&self) -> GString { ... } fn is_default(&self) -> bool { ... } fn is_default6(&self) -> bool { ... } fn devices(&self) -> Vec<Device> { ... } fn dhcp4_config(&self) -> DhcpConfig { ... } fn dhcp6_config(&self) -> DhcpConfig { ... } fn id(&self) -> GString { ... } fn ip4_config(&self) -> IPConfig { ... } fn ip6_config(&self) -> IPConfig { ... } fn specific_object_path(&self) -> GString { ... } fn state(&self) -> ActiveConnectionState { ... } fn state_flags(&self) -> ActivationStateFlags { ... } fn state_reason(&self) -> ActiveConnectionStateReason { ... } fn uuid(&self) -> GString { ... } fn is_vpn(&self) -> bool { ... } fn type_(&self) -> Option<GString> { ... } fn connect_state_changed<F: Fn(&Self, u32, u32) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_connection_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_default_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_default6_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_devices_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_dhcp4_config_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_dhcp6_config_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... } fn connect_ip4_config_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_ip6_config_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_master_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_specific_object_path_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_state_flags_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_type_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_uuid_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_vpn_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all ActiveConnection methods.

§Implementors

ActiveConnection, VpnConnection

Provided Methods§

Source

fn connection(&self) -> RemoteConnection

Gets the #NMRemoteConnection associated with @self.

§Returns

the #NMRemoteConnection which this #NMActiveConnection is an active instance of.

Source

fn connection_type(&self) -> GString

Gets the #NMConnection’s type.

§Returns

the type of the #NMConnection that backs the #NMActiveConnection. This is the internal string used by the connection, and must not be modified.

Source

fn is_default(&self) -> bool

Whether the active connection is the default IPv4 one (that is, is used for the default IPv4 route and DNS information).

§Returns

true if the active connection is the default IPv4 connection

Source

fn is_default6(&self) -> bool

Whether the active connection is the default IPv6 one (that is, is used for the default IPv6 route and DNS information).

§Returns

true if the active connection is the default IPv6 connection

Source

fn devices(&self) -> Vec<Device>

Gets the #NMDevices used for the active connections.

§Returns

the #GPtrArray containing #NMDevices. This is the internal copy used by the connection, and must not be modified.

Source

fn dhcp4_config(&self) -> DhcpConfig

Gets the current IPv4 #NMDhcpConfig (if any) associated with the #NMActiveConnection.

§Returns

the IPv4 #NMDhcpConfig, or None if the connection does not use DHCP, or is not in the ActiveConnectionState::Activated state.

Source

fn dhcp6_config(&self) -> DhcpConfig

Gets the current IPv6 #NMDhcpConfig (if any) associated with the #NMActiveConnection.

§Returns

the IPv6 #NMDhcpConfig, or None if the connection does not use DHCPv6, or is not in the ActiveConnectionState::Activated state.

Source

fn id(&self) -> GString

Gets the #NMConnection’s ID.

§Returns

the ID of the #NMConnection that backs the #NMActiveConnection. This is the internal string used by the connection, and must not be modified.

Source

fn ip4_config(&self) -> IPConfig

Gets the current IPv4 #NMIPConfig associated with the #NMActiveConnection.

§Returns

the IPv4 #NMIPConfig, or None if the connection is not in the ActiveConnectionState::Activated state.

Source

fn ip6_config(&self) -> IPConfig

Gets the current IPv6 #NMIPConfig associated with the #NMActiveConnection.

§Returns

the IPv6 #NMIPConfig, or None if the connection is not in the ActiveConnectionState::Activated state.

Source

fn specific_object_path(&self) -> GString

Gets the path of the “specific object” used at activation.

Currently, there is no single method that will allow you to automatically turn this into an appropriate #NMObject; you need to know what kind of object it is based on other information. (Eg, if @self corresponds to a Wi-Fi connection, then the specific object will be an #NMAccessPoint, and you can resolve it with nm_device_wifi_get_access_point_by_path().)

§Returns

the specific object’s D-Bus path. This is the internal string used by the connection, and must not be modified.

Source

fn state(&self) -> ActiveConnectionState

Gets the active connection’s state.

§Returns

the state

Source

fn state_flags(&self) -> ActivationStateFlags

Available on crate feature v1_10 only.

Gets the active connection’s state flags.

§Returns

the state flags

Source

fn state_reason(&self) -> ActiveConnectionStateReason

Available on crate feature v1_8 only.

Gets the reason for active connection’s state.

§Returns

the reason

Source

fn uuid(&self) -> GString

Gets the #NMConnection’s UUID.

§Returns

the UUID of the #NMConnection that backs the #NMActiveConnection. This is the internal string used by the connection, and must not be modified.

Source

fn is_vpn(&self) -> bool

Whether the active connection is a VPN connection.

§Returns

true if the active connection is a VPN connection

Source

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

The active connection’s type

Source

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

§state

the new state number (#NMActiveConnectionState)

§reason

the state change reason (#NMActiveConnectionStateReason)

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Available on crate feature v1_10 only.
Source

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

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§