Skip to main content

VolumeMonitorExt

Trait VolumeMonitorExt 

Source
pub trait VolumeMonitorExt: IsA<VolumeMonitor> + 'static {
Show 17 methods // Provided methods fn connected_drives(&self) -> Vec<Drive> { ... } fn mount_for_uuid(&self, uuid: &str) -> Option<Mount> { ... } fn mounts(&self) -> Vec<Mount> { ... } fn volume_for_uuid(&self, uuid: &str) -> Option<Volume> { ... } fn volumes(&self) -> Vec<Volume> { ... } fn connect_drive_changed<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Drive) + 'static { ... } fn connect_drive_connected<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Drive) + 'static { ... } fn connect_drive_disconnected<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Drive) + 'static { ... } fn connect_drive_eject_button<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Drive) + 'static { ... } fn connect_drive_stop_button<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Drive) + 'static { ... } fn connect_mount_added<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Mount) + 'static { ... } fn connect_mount_changed<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Mount) + 'static { ... } fn connect_mount_pre_unmount<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Mount) + 'static { ... } fn connect_mount_removed<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Mount) + 'static { ... } fn connect_volume_added<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Volume) + 'static { ... } fn connect_volume_changed<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Volume) + 'static { ... } fn connect_volume_removed<F>(&self, f: F) -> SignalHandlerId where F: Fn(&Self, &Volume) + 'static { ... }
}
Expand description

Trait containing all VolumeMonitor methods.

§Implementors

NativeVolumeMonitor, VolumeMonitor

Provided Methods§

Source

fn connected_drives(&self) -> Vec<Drive>

Gets a list of drives connected to the system.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

§Returns

a #GList of connected #GDrive objects.

Source

fn mount_for_uuid(&self, uuid: &str) -> Option<Mount>

Finds a #GMount object by its UUID (see g_mount_get_uuid())

§uuid

the UUID to look for

§Returns

a #GMount or None if no such mount is available. Free the returned object with g_object_unref().

Source

fn mounts(&self) -> Vec<Mount>

Gets a list of the mounts on the system.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

§Returns

a #GList of #GMount objects.

Source

fn volume_for_uuid(&self, uuid: &str) -> Option<Volume>

Finds a #GVolume object by its UUID (see g_volume_get_uuid())

§uuid

the UUID to look for

§Returns

a #GVolume or None if no such volume is available. Free the returned object with g_object_unref().

Source

fn volumes(&self) -> Vec<Volume>

Gets a list of the volumes on the system.

The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

§Returns

a #GList of #GVolume objects.

Source

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

Emitted when a drive changes.

§drive

the drive that changed

Source

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

Emitted when a drive is connected to the system.

§drive

a #GDrive that was connected.

Source

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

Emitted when a drive is disconnected from the system.

§drive

a #GDrive that was disconnected.

Source

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

Emitted when the eject button is pressed on @drive.

§drive

the drive where the eject button was pressed

Source

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

Emitted when the stop button is pressed on @drive.

§drive

the drive where the stop button was pressed

Source

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

Emitted when a mount is added.

§mount

a #GMount that was added.

Source

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

Emitted when a mount changes.

§mount

a #GMount that changed.

Source

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

May be emitted when a mount is about to be removed.

This signal depends on the backend and is only emitted if GIO was used to unmount.

§mount

a #GMount that is being unmounted.

Source

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

Emitted when a mount is removed.

§mount

a #GMount that was removed.

Source

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

Emitted when a mountable volume is added to the system.

§volume

a #GVolume that was added.

Source

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

Emitted when mountable volume is changed.

§volume

a #GVolume that changed.

Source

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

Emitted when a mountable volume is removed from the system.

§volume

a #GVolume that was removed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§