pub trait DriveExt: 'static {
Show 30 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_poll_for_media(&self) -> bool
source
fn can_start_degraded(&self) -> bool
sourcefn eject_with_operation<P: FnOnce(Result<(), Error>) + 'static>(
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
)
sourcefn eject_with_operation_future(
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 identifier(&self, kind: &str) -> Option<GString>
source
fn start_stop_type(&self) -> DriveStartStopType
source
fn symbolic_icon(&self) -> Icon
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
sourcefn poll_for_media<P: FnOnce(Result<(), Error>) + 'static>(
fn poll_for_media<P: FnOnce(Result<(), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
sourcefn poll_for_media_future(
fn poll_for_media_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
sourcefn start<P: FnOnce(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
)
sourcefn start_future(
fn start_future(
&self,
flags: DriveStartFlags,
mount_operation: Option<&impl IsA<MountOperation> + Clone + 'static>
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
sourcefn stop<P: FnOnce(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
)
sourcefn stop_future(
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