gio::prelude

Trait DriveExt

Source
pub trait DriveExt:
    IsA<Drive>
    + Sealed
    + 'static {
Show 30 methods // Provided methods fn can_eject(&self) -> bool { ... } fn can_poll_for_media(&self) -> bool { ... } fn can_start(&self) -> bool { ... } fn can_start_degraded(&self) -> bool { ... } fn can_stop(&self) -> bool { ... } fn eject_with_operation<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) { ... } fn eject_with_operation_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn enumerate_identifiers(&self) -> Vec<GString> { ... } fn icon(&self) -> Icon { ... } fn identifier(&self, kind: &str) -> Option<GString> { ... } fn name(&self) -> GString { ... } fn sort_key(&self) -> Option<GString> { ... } fn start_stop_type(&self) -> DriveStartStopType { ... } fn symbolic_icon(&self) -> Icon { ... } fn volumes(&self) -> Vec<Volume> { ... } fn has_media(&self) -> bool { ... } fn has_volumes(&self) -> bool { ... } fn is_media_check_automatic(&self) -> bool { ... } fn is_media_removable(&self) -> bool { ... } fn is_removable(&self) -> bool { ... } fn poll_for_media<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) { ... } fn poll_for_media_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn start<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: DriveStartFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) { ... } fn start_future( &self, flags: DriveStartFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn stop<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, ) { ... } fn stop_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... } fn connect_disconnected<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_eject_button<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_stop_button<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}

Provided Methods§

Source

fn can_eject(&self) -> bool

Source

fn can_poll_for_media(&self) -> bool

Source

fn can_start(&self) -> bool

Source

fn can_start_degraded(&self) -> bool

Source

fn can_stop(&self) -> bool

Source

fn eject_with_operation<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Source

fn eject_with_operation_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

Source

fn enumerate_identifiers(&self) -> Vec<GString>

Source

fn icon(&self) -> Icon

Source

fn identifier(&self, kind: &str) -> Option<GString>

Source

fn name(&self) -> GString

Source

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

Source

fn start_stop_type(&self) -> DriveStartStopType

Source

fn symbolic_icon(&self) -> Icon

Source

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

Source

fn has_media(&self) -> bool

Source

fn has_volumes(&self) -> bool

Source

fn is_media_check_automatic(&self) -> bool

Source

fn is_media_removable(&self) -> bool

Source

fn is_removable(&self) -> bool

Source

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

Source

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

Source

fn start<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: DriveStartFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Source

fn start_future( &self, flags: DriveStartFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

Source

fn stop<P: FnOnce(Result<(), Error>) + 'static>( &self, flags: MountUnmountFlags, mount_operation: Option<&impl IsA<MountOperation>>, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )

Source

fn stop_future( &self, flags: MountUnmountFlags, mount_operation: Option<&(impl IsA<MountOperation> + Clone + 'static)>, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

Source

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

Source

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

Source

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

Source

fn connect_stop_button<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§

Source§

impl<O: IsA<Drive>> DriveExt for O