RemoteConnection

Struct RemoteConnection 

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

§Properties

§filename

File that stores the connection in case the connection is file-backed.

Readable

§flags

The flags of the connection as unsigned integer. The values correspond to the #NMSettingsConnectionFlags enum.

Readable

§unsaved

true if the remote connection contains changes that have not been saved to disk, false if the connection is the same as its on-disk representation.

Readable

§version-id

The version ID of the profile that is incremented when the profile gets modified. This can be used to track concurrent modifications of the profile.

Readable

§visible

true if the remote connection is visible to the current user, false if not. If the connection is not visible then it is essentially useless; it will not contain any settings, and operations such as nm_remote_connection_save() and nm_remote_connection_delete() will always fail. (#NMRemoteSettings will not normally return non-visible connections to callers, but it is possible for a connection’s visibility to change after you already have a reference to it.)

Readable

Object

§client

The NMClient instance as returned by nm_object_get_client().

When an NMObject gets removed from the NMClient cache, the NMObject:path property stays unchanged, but this client instance gets reset to None. You can use this property to track removal of the object from the cache.

Readable

§path

The D-Bus object path.

The D-Bus path of an object instance never changes, even if the object gets removed from the cache. To see whether the object is still in the cache, check NMObject:client.

Readable

§Implements

ObjectExt, ConnectionExt

GLib type: GObject with reference counted clone semantics.

Implementations§

Source§

impl RemoteConnection

Source

pub fn commit_changes( &self, save_to_disk: bool, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>

Send any local changes to the settings and properties of @self to NetworkManager. If @save_to_disk is true, the updated connection will be saved to disk; if false, then only the in-memory representation will be changed.

§Deprecated since 1.22

Use nm_remote_connection_commit_changes_async() or GDBusConnection.

§save_to_disk

whether to persist the changes to disk

§cancellable

a #GCancellable, or None

§Returns

true on success, false on error, in which case @error will be set.

Source

pub fn commit_changes_async<P: FnOnce(Result<(), Error>) + 'static>( &self, save_to_disk: bool, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Asynchronously sends any local changes to the settings and properties of @self to NetworkManager. If @save is true, the updated connection will be saved to disk; if false, then only the in-memory representation will be changed.

§save_to_disk

whether to save the changes to persistent storage

§cancellable

a #GCancellable, or None

§callback

callback to be called when the commit operation completes

Source

pub fn commit_changes_future( &self, save_to_disk: bool, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

Source

pub fn delete( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>

Deletes the connection.

§Deprecated since 1.22

Use nm_remote_connection_delete_async() or GDBusConnection.

§cancellable

a #GCancellable, or None

§Returns

true on success, false on error, in which case @error will be set.

Source

pub fn delete_async<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Asynchronously deletes the connection.

§cancellable

a #GCancellable, or None

§callback

callback to be called when the delete operation completes

Source

pub fn delete_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

Source

pub fn filename(&self) -> GString

Available on crate feature v1_12 only.
§Returns

file that stores the connection in case the connection is file-backed.

Source

pub fn flags(&self) -> SettingsConnectionFlags

Available on crate feature v1_12 only.
§Returns

the flags of the connection of type #NMSettingsConnectionFlags.

Source

pub fn is_unsaved(&self) -> bool

§Returns

true if the remote connection contains changes that have not been saved to disk, false if the connection is the same as its on-disk representation.

Source

pub fn is_visible(&self) -> bool

Checks if the connection is visible to the current user. If the connection is not visible then it is essentially useless; it will not contain any settings, and operations such as nm_remote_connection_save() and nm_remote_connection_delete() will always fail. (#NMRemoteSettings will not normally return non-visible connections to callers, but it is possible for a connection’s visibility to change after you already have a reference to it.)

§Returns

true if the remote connection is visible to the current user, false if not.

Source

pub fn save( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>

Saves the connection to disk if the connection has changes that have not yet been written to disk, or if the connection has never been saved.

§Deprecated since 1.22

Use nm_remote_connection_save_async() or GDBusConnection.

§cancellable

a #GCancellable, or None

§Returns

true on success, false on error, in which case @error will be set.

Source

pub fn save_async<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Saves the connection to disk if the connection has changes that have not yet been written to disk, or if the connection has never been saved.

§cancellable

a #GCancellable, or None

§callback

callback to be called when the save operation completes

Source

pub fn save_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

Source

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

Available on crate feature v1_12 only.
Source

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

Available on crate feature v1_12 only.
Source

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

Source

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

Trait Implementations§

Source§

impl Clone for RemoteConnection

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 RemoteConnection

Source§

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

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

impl HasParamSpec for RemoteConnection

Source§

type ParamSpec = ParamSpecObject

Source§

type SetValue = RemoteConnection

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

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

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for RemoteConnection

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 RemoteConnection

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 RemoteConnection

Source§

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

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 RemoteConnection

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 RemoteConnection

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl Eq for RemoteConnection

Source§

impl IsA<Connection> for RemoteConnection

Source§

impl IsA<Object> for RemoteConnection

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<O> ConnectionExt for O
where O: IsA<Connection>,

Source§

fn add_setting(&self, setting: impl IsA<Setting>)

Adds a #NMSetting to the connection, replacing any previous #NMSetting of the same name which has previously been added to the #NMConnection. The connection takes ownership of the #NMSetting object and does not increase the setting object’s reference count. Read more
Source§

fn clear_secrets(&self)

Clears and frees any secrets that may be stored in the connection, to avoid keeping secret data in memory when not needed.
Source§

fn clear_secrets_with_flags( &self, func: Option<&mut dyn FnMut(&Setting, &str, &SettingSecretFlags) -> bool>, )

Clears and frees secrets determined by @func. Read more
Source§

fn clear_settings(&self)

Deletes all of @self’s settings.
Source§

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

Source§

fn dump(&self)

Print the connection (including secrets!) to stdout. 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.
Source§

fn connection_type(&self) -> GString

A shortcut to return the type from the connection’s #NMSettingConnection. Read more
Source§

fn id(&self) -> GString

A shortcut to return the ID from the connection’s #NMSettingConnection. Read more
Source§

fn interface_name(&self) -> GString

Returns the interface name as stored in NMSettingConnection:interface_name. If the connection contains no NMSettingConnection, it will return None. Read more
Source§

fn path(&self) -> GString

Returns the connection’s D-Bus path. Read more
Source§

fn setting(&self, setting_type: Type) -> Setting

Gets the #NMSetting with the given #GType, if one has been previously added to the #NMConnection. Read more
Source§

fn setting_802_1x(&self) -> Setting8021x

A shortcut to return any #NMSetting8021x the connection might contain. Read more
Source§

fn setting_adsl(&self) -> SettingAdsl

A shortcut to return any #NMSettingAdsl the connection might contain. Read more
Source§

fn setting_bluetooth(&self) -> SettingBluetooth

A shortcut to return any #NMSettingBluetooth the connection might contain. Read more
Source§

fn setting_bond(&self) -> SettingBond

A shortcut to return any #NMSettingBond the connection might contain. Read more
Source§

fn setting_bridge(&self) -> SettingBridge

A shortcut to return any #NMSettingBridge the connection might contain. Read more
Source§

fn setting_bridge_port(&self) -> SettingBridgePort

A shortcut to return any #NMSettingBridgePort the connection might contain. Read more
Source§

fn setting_by_name(&self, name: &str) -> Setting

Gets the #NMSetting with the given name, if one has been previously added the #NMConnection. Read more
Source§

fn setting_cdma(&self) -> SettingCdma

A shortcut to return any #NMSettingCdma the connection might contain. Read more
Source§

fn setting_connection(&self) -> SettingConnection

A shortcut to return any #NMSettingConnection the connection might contain. Read more
Source§

fn setting_dcb(&self) -> SettingDcb

A shortcut to return any #NMSettingDcb the connection might contain. Read more
Source§

fn setting_dummy(&self) -> SettingDummy

Available on crate feature v1_8 only.
A shortcut to return any #NMSettingDummy the connection might contain. Read more
Source§

fn setting_generic(&self) -> SettingGeneric

A shortcut to return any #NMSettingGeneric the connection might contain. Read more
Source§

fn setting_gsm(&self) -> SettingGsm

A shortcut to return any #NMSettingGsm the connection might contain. Read more
Source§

fn setting_infiniband(&self) -> SettingInfiniband

A shortcut to return any #NMSettingInfiniband the connection might contain. Read more
Source§

fn setting_ip4_config(&self) -> SettingIP4Config

A shortcut to return any #NMSettingIP4Config the connection might contain. Read more
Source§

fn setting_ip6_config(&self) -> SettingIP6Config

A shortcut to return any #NMSettingIP6Config the connection might contain. Read more
Source§

fn setting_ip_tunnel(&self) -> SettingIPTunnel

Available on crate feature v1_2 only.
A shortcut to return any #NMSettingIPTunnel the connection might contain. Read more
Source§

fn setting_macsec(&self) -> SettingMacsec

Available on crate feature v1_6 only.
A shortcut to return any #NMSettingMacsec the connection might contain. Read more
Source§

fn setting_macvlan(&self) -> SettingMacvlan

Available on crate feature v1_2 only.
A shortcut to return any #NMSettingMacvlan the connection might contain. Read more
Source§

fn setting_olpc_mesh(&self) -> SettingOlpcMesh

A shortcut to return any #NMSettingOlpcMesh the connection might contain. Read more
Source§

fn setting_ovs_bridge(&self) -> SettingOvsBridge

Available on crate feature v1_14 only.
A shortcut to return any #NMSettingOvsBridge the connection might contain. Read more
Source§

fn setting_ovs_patch(&self) -> SettingOvsPatch

Available on crate feature v1_14 only.
A shortcut to return any #NMSettingOvsPatch the connection might contain. Read more
Source§

fn setting_ovs_port(&self) -> SettingOvsPort

Available on crate feature v1_14 only.
A shortcut to return any #NMSettingOvsPort the connection might contain. Read more
Source§

fn setting_ppp(&self) -> SettingPpp

A shortcut to return any #NMSettingPpp the connection might contain. Read more
Source§

fn setting_pppoe(&self) -> SettingPppoe

A shortcut to return any #NMSettingPppoe the connection might contain. Read more
Source§

fn setting_proxy(&self) -> SettingProxy

Available on crate feature v1_6 only.
A shortcut to return any #NMSettingProxy the connection might contain. Read more
Source§

fn setting_serial(&self) -> SettingSerial

A shortcut to return any #NMSettingSerial the connection might contain. Read more
Source§

fn setting_tc_config(&self) -> SettingTCConfig

Available on crate feature v1_12 only.
A shortcut to return any #NMSettingTCConfig the connection might contain. Read more
Source§

fn setting_team(&self) -> SettingTeam

A shortcut to return any #NMSettingTeam the connection might contain. Read more
Source§

fn setting_team_port(&self) -> SettingTeamPort

A shortcut to return any #NMSettingTeamPort the connection might contain. Read more
Source§

fn setting_tun(&self) -> SettingTun

Available on crate feature v1_14 only.
A shortcut to return any #NMSettingTun the connection might contain. Read more
Source§

fn setting_vlan(&self) -> SettingVlan

A shortcut to return any #NMSettingVlan the connection might contain. Read more
Source§

fn setting_vpn(&self) -> SettingVpn

A shortcut to return any #NMSettingVpn the connection might contain. Read more
Source§

fn setting_vxlan(&self) -> SettingVxlan

Available on crate feature v1_2 only.
A shortcut to return any #NMSettingVxlan the connection might contain. Read more
Source§

fn setting_wimax(&self) -> SettingWimax

A shortcut to return any #NMSettingWimax the connection might contain. Read more
Source§

fn setting_wired(&self) -> SettingWired

A shortcut to return any #NMSettingWired the connection might contain. Read more
Source§

fn setting_wireless(&self) -> SettingWireless

A shortcut to return any #NMSettingWireless the connection might contain. Read more
Source§

fn setting_wireless_security(&self) -> SettingWirelessSecurity

A shortcut to return any #NMSettingWirelessSecurity the connection might contain. Read more
Source§

fn settings(&self) -> Vec<Setting>

Available on crate feature v1_10 only.
Retrieves the settings in @self. Read more
Source§

fn uuid(&self) -> GString

A shortcut to return the UUID from the connection’s #NMSettingConnection. Read more
Source§

fn virtual_device_description(&self) -> GString

Returns the name that nm_device_disambiguate_names() would return for the virtual device that would be created for @self. Eg, “VLAN (eth1.1)”. Read more
Source§

fn is_type(&self, type_: &str) -> bool

A convenience function to check if the given @self is a particular type (ie wired, Wi-Fi, ppp, etc). Checks the #NMSettingConnection:type property of the connection and matches that against @type_. Read more
Source§

fn is_virtual(&self) -> bool

Checks if @self refers to a virtual device (and thus can potentially be activated even if the device it refers to doesn’t exist). Read more
Source§

fn need_secrets(&self) -> (Option<GString>, Vec<GString>)

Returns the name of the first setting object in the connection which would need secrets to make a successful connection. The returned hints are only intended as a guide to what secrets may be required, because in some circumstances, there is no way to conclusively determine exactly which secrets are needed. Read more
Source§

fn remove_setting(&self, setting_type: Type)

Removes the #NMSetting with the given #GType from the #NMConnection. This operation dereferences the #NMSetting object. Read more
Source§

fn replace_settings_from_connection( &self, new_connection: &impl IsA<Connection>, )

Deep-copies the settings of @new_connection and replaces the settings of @self with the copied settings. Read more
Source§

fn set_path(&self, path: &str)

Sets the D-Bus path of the connection. This property is not serialized, and is only for the reference of the caller. Sets the #NMConnection:path property. Read more
Source§

fn verify(&self) -> Result<(), Error>

Validates the connection and all its settings. Each setting’s properties have allowed values, and some values are dependent on other values. For example, if a Wi-Fi connection is security enabled, the #NMSettingWireless setting object’s ‘security’ property must contain the setting name of the #NMSettingWirelessSecurity object, which must also be present in the connection for the connection to be valid. As another example, the #NMSettingWired object’s ‘mac-address’ property must be a validly formatted MAC address. The returned #GError contains information about which setting and which property failed validation, and how it failed validation. Read more
Source§

fn verify_secrets(&self) -> Result<(), Error>

Available on crate feature v1_2 only.
Verifies the secrets in the connection. Read more
Source§

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

The ::changed signal is emitted when any property (including secrets) of any setting of the connection is modified, or when settings are added or removed.
Source§

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

The ::secrets-cleared signal is emitted when the secrets of a connection are cleared.
Source§

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

The ::secrets-updated signal is emitted when the secrets of a setting have been changed. 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<O> ObjectExt for O
where O: IsA<Object>,

Source§

fn path(&self) -> GString

Gets the DBus path of the #NMObject. Read more
Source§

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

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<T> RemoteConnectionExtManual for T
where T: IsA<RemoteConnection, GlibType = NMRemoteConnection>,

Source§

fn secrets( &self, setting_name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Variant, Error>

Source§

fn secrets_async<P: FnOnce(Result<Variant, Error>) + 'static>( &self, setting_name: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Source§

fn secrets_future( &self, setting_name: &str, ) -> Pin<Box<dyn Future<Output = Result<Variant, Error>> + 'static>>

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