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: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_drive_connected<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_drive_disconnected<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_drive_eject_button<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_drive_stop_button<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mount_added<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mount_changed<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mount_pre_unmount<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mount_removed<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_volume_added<F: Fn(&Self, &Volume) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_volume_changed<F: Fn(&Self, &Volume) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_volume_removed<F: Fn(&Self, &Volume) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
Sourcefn connected_drives(&self) -> Vec<Drive>
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.
Sourcefn mount_for_uuid(&self, uuid: &str) -> Option<Mount>
fn mount_for_uuid(&self, uuid: &str) -> Option<Mount>
Sourcefn mounts(&self) -> Vec<Mount>
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.
Sourcefn volume_for_uuid(&self, uuid: &str) -> Option<Volume>
fn volume_for_uuid(&self, uuid: &str) -> Option<Volume>
Sourcefn volumes(&self) -> Vec<Volume>
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.
Sourcefn connect_drive_changed<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_drive_changed<F: Fn(&Self, &Drive) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_drive_connected<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_drive_connected<F: Fn(&Self, &Drive) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_drive_disconnected<F: Fn(&Self, &Drive) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_drive_disconnected<F: Fn(&Self, &Drive) + 'static>( &self, f: F, ) -> SignalHandlerId
Emitted when the eject button is pressed on @drive.
§drive
the drive where the eject button was pressed
Emitted when the stop button is pressed on @drive.
§drive
the drive where the stop button was pressed
Sourcefn connect_mount_added<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_mount_added<F: Fn(&Self, &Mount) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_mount_changed<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_mount_changed<F: Fn(&Self, &Mount) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_mount_pre_unmount<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_mount_pre_unmount<F: Fn(&Self, &Mount) + 'static>( &self, f: F, ) -> SignalHandlerId
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.
Sourcefn connect_mount_removed<F: Fn(&Self, &Mount) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_mount_removed<F: Fn(&Self, &Mount) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_volume_added<F: Fn(&Self, &Volume) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_volume_added<F: Fn(&Self, &Volume) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_volume_changed<F: Fn(&Self, &Volume) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_volume_changed<F: Fn(&Self, &Volume) + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_volume_removed<F: Fn(&Self, &Volume) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_volume_removed<F: Fn(&Self, &Volume) + '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.