Trait gio::prelude::DriveExt

source ·
pub trait DriveExt: 'static {
Show 30 methods // Required 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;
}

Required 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

Available on crate feature v2_50 only.
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

Implementors§

source§

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